<script lang="ts">
	import { base } from '$app/paths';
	import { _ } from 'svelte-i18n';
	import { page } from '$app/state';
	const currentPage = page.url.pathname.replace(base,"").replace("/","");
	const blank_pages = ['logout'];
	const blank_page = blank_pages.includes(currentPage);
</script>

{#if !blank_page}
	<main class="flex min-h-screen flex-col items-center justify-center bg-gray-100 p-8">
		<h1 class="mb-4 text-5xl font-extrabold text-red-600">{page.status}</h1>
		<p class="mb-6 text-xl text-gray-700">{page.error?.message ?? $_('error.not_found')}</p>
		<a href={base + '/'} class="rounded bg-blue-600 px-4 py-2 text-white hover:bg-blue-700"
			>{$_('error.home')}</a
		>
	</main>
{/if}
