---
import '@/styles/pages/domande-esami.css'

import type { GetStaticPaths } from 'astro'
import BaseLayout from '@/layouts/BaseLayout.astro'
import Footer from '@/components/Footer.astro'
import Header from '@/components/Header.astro'

import database from '@/data/domande-esami.yaml'
import { DomandeEsamiCourse } from '@/client/DomandeEsamiCourse'

export const getStaticPaths = (() => {
    return Object.keys(database.names).map(course => ({
        params: { course },
    }))
}) satisfies GetStaticPaths

const { course } = Astro.params
---

<BaseLayout title="Domande Orali | PHC">
    <Header />
    <main>
        <DomandeEsamiCourse client:only="preact" course={course} />
    </main>
    <Footer />
</BaseLayout>
