// SINGLE SOURCE OF TRUTH for server-rendered public pages.
//
// Add an entry here, then write the component it points at, then run the bundler.
// It regenerates:
//   - internal/handlers/public_pages.gen.go   Go registry: route → <title> + baked HTML
//   - frontend/src/pages/public/routes.gen.ts client takeover map: route → component
//
// Both generated files are read back by code that is committed, so neither is
// optional — but neither is hand-edited either.

export interface PublicPageDef {
    path: string; // URL pathname
    module: string; // component file, relative to frontend/src
    component: string; // exported component name
    title: string; // <title> text
    dynamic?: boolean; // ISR: also bake the render bundle so the server can render
    // this page with live data at request time
}

export const publicPages: PublicPageDef[] = [
    {
        path: "/js/ssr",
        module: "pages/public/Ssr.tsx",
        component: "Ssr",
        title: "Server-rendered — Kjøl JS Web",
        // dynamic: the server may inject data for this route at request time, so bake
        // the render bundle too, not just the static skeleton.
        dynamic: true,
    },
];
