/** * Base HTML layout for all admin pages. * Server-side rendered via jsx-htmx — returns string. */ import { css, js } from "jsx-htmx"; import { serverVersion } from "../shared/version.js"; import type { Tenant } from "../shared/types.js"; // ---- Shared types ----------------------------------------------------------- export interface PageProps { title: string; /** Username shown in navbar; omit for unauthenticated pages. */ user?: string; /** If true, hide the sidebar nav (used for login/setup). */ minimal?: boolean; /** Optional flash message. */ flash?: { type: "success" | "error" | "info"; message: string }; /** Active nav item key. */ activeNav?: string; /** Available tenants for tenant switcher (PG multi-tenant only). */ tenants?: Tenant[]; /** Currently selected tenant slug. */ currentTenantSlug?: string; children?: string | string[]; } // ---- Components ------------------------------------------------------------- function NavItem(props: { href: string; label: string; icon: string; active?: boolean }) { return ( {props.label} ); } function Sidebar(props: { activeNav?: string }) { const a = props.activeNav; return ( ); } // ---- Layout ----------------------------------------------------------------- export function Layout(props: PageProps) { const version = serverVersion(); return (