---
export const prerender = true;

import type { GetStaticPaths } from "astro";
import MainLayout from "../layouts/MainLayout.astro";

export const getStaticPaths = (() => {
  return [
    {params: {lang: "en"}},
    {params: {lang: "cs"}},
    {params: {lang: "de"}},
    {params: {lang: "fr"}}
  ];
}) satisfies GetStaticPaths;

const { lang } = Astro.params

// Don't remove
if (Astro.preferredLocale) {
  return Astro.redirect(`/${Astro.preferredLocale}/`);
}

---

<MainLayout title="sitetitle" description="sitedescription" lang={lang}>
  <h1>Welcome</h1>
  <p>
    You shouldn't be here. please continue to one of the following:
  </p>
  <ul>
    <li><a href="/en">English Version / English</a></li>
    <li><a href="/cs">Czech Version / Česky</a></li>
    <li><a href="/de">German Version [WIP] / Deutsch [laufende Arbeiten]</a></li>
    <li><a href="/fr">French Version [WIP] / Français [travail en cours]</a></li>
  </ul>
</MainLayout>