<script lang="ts">
	import { goto } from '$app/navigation';
	import { onMount } from 'svelte';
	import { isAuthenticated, authLoading } from '$lib/stores/auth';

	onMount(() => {
		const unsubLoading = authLoading.subscribe((loading) => {
			if (!loading) {
				unsubLoading();
				goto('/lists', { replaceState: true });
			}
		});
	});
</script>

<!-- Redirect root to /lists — handled in onMount after auth resolves -->
