import { Content, Header, HeaderGlobalAction, HeaderGlobalBar, HeaderMenuItem, HeaderName, HeaderNavigation, SkipToContent, } from "@carbon/react"; import { Asleep, Light } from "@carbon/icons-react"; import type { ReactNode } from "react"; export type AppView = "new" | "invoices" | "series" | "settings"; const NAV: { id: AppView; label: string }[] = [ { id: "new", label: "New invoice" }, { id: "invoices", label: "Invoices" }, { id: "series", label: "Series" }, { id: "settings", label: "Settings" }, ]; interface AppShellProps { view: AppView; onNavigate: (view: AppView) => void; theme: string; onToggleTheme: () => void; children: ReactNode; } export function AppShell({ view, onNavigate, theme, onToggleTheme, children }: AppShellProps) { // The Carbon header background follows the theme: light on g10, dark on g100. // The "dark" wordmark has dark text for light surfaces; "light" has white text for dark ones. const wordmark = theme === "g100" ? "/brand/bongbetic-wordmark-dark.png" : "/brand/bongbetic-wordmark-light.png"; return ( <>
Bongbetic {NAV.map((item) => ( { event.preventDefault(); onNavigate(item.id); }} > {item.label} ))} {theme === "g100" ? : }
{children} ); }