---
import { Body, Container, H1 } from '@components/primitives';
import Layout from '@layouts/Layout.astro';
import { getLangFromUrl, useTranslations } from '@i18n/utils';
import { languages } from '@i18n/ui';

export function getStaticPaths() {
  return Object.keys(languages).map((lang) => ({
    params: { lang },
  }));
}

const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
---

<Layout>
  <Container>
    <H1>{t('home.welcome')}</H1>
    <Body>This is a work-in-progress homepage.</Body>
    <ul>
      <li>
        Review the <a href={`/${lang}/ds-foundations`}>Design System Foundations</a> demo page to explore
        all tokens, primitives, and patterns.
      </li>
    </ul>
  </Container>
</Layout>
