import type { ReactNode } from "react"; import { NavLink, Outlet } from "react-router"; import { GameClock } from "../clock/GameClock"; import { SCREENS, type ScreenPath } from "../routes"; import { Icon } from "../ui"; export interface LayoutProps { /** Shown at the top right. Credits arrive with the player state (Step 8.5). */ credits?: ReactNode; clock?: ReactNode; /** Shown under the header, e.g. the offline notice. */ banner?: ReactNode; /** Attention badge counts per tab (decision 0.5.49). */ attention?: Partial>; } /** * HUD header with credits and game clock, the current screen, and icon * navigation: a bottom bar on phones, a left rail from `md` (CR-005). * `--header-h` and `--nav-h` let full-height screens (the map) fit exactly. */ export function Layout({ credits = "—", clock = , banner, attention = {}, }: LayoutProps) { return (
DEADHEAD Space Freight
{credits}
{clock}
{banner}
); } function NavTab({ path, label, icon, badge, }: { path: ScreenPath; label: string; icon: (typeof SCREENS)[number]["icon"]; badge: number; }) { return ( `group relative flex flex-col items-center justify-center gap-0.5 transition-colors md:py-2 ${ isActive ? "text-amber-300" : "text-ink-400 hover:text-ink-50" }` } > {({ isActive }) => ( <> ); } /** The game's mark: an orbit ring around an arrowhead. */ function LogoMark() { return ( ); }