<script lang="ts">
	import { browser } from '$app/environment';
	import { closest } from '$lib/Error/path';

	$: suggestion = closest(browser ? window.location.pathname : '...', [
		'birthdays',
		'completed',
		'schedule',
		'settings',
		'tools',
		'updates',
		'user',
		'wrapped'
	]);
</script>

<p>Page not found.</p>

<blockquote>
	Did you mean "<a
		href={suggestion}
		style={suggestion === '...' ? 'pointer-events: none; color: inherit;' : ''}
		>{suggestion.charAt(0).toUpperCase() + suggestion.slice(1)}</a
	>"?
</blockquote>
