<script>
import { Link } from "@inertiajs/svelte";
// Optional: render with `Inertia::render("Error", {status})` for a friendly error page.
let { status = 404 } = $props();
const text = $derived(
{ 403: "You are not allowed to see this.", 404: "We could not find that page.", 419: "Your session expired. Please try again.", 500: "Something broke on our side.", 503: "Back in a moment." }[status] ?? "Something went wrong.",
);
</script>
<svelte:head><title>{status}</title></svelte:head>
<div class="wrap status">
<div>
<div class="code" aria-hidden="true">{status}</div>
<h1>{status}</h1>
<p>{text}</p>
<Link href="/" class="btn btn-primary">Back home</Link>
</div>
</div>