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" | "clients" | "settings";
const NAV: { id: AppView; label: string }[] = [
{ id: "new", label: "New invoice" },
{ id: "invoices", label: "Invoices" },
{ id: "clients", label: "Clients" },
{ 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 (
<>
Voiced
{NAV.map((item) => (
{
event.preventDefault();
onNavigate(item.id);
}}
>
{item.label}
))}
{theme === "g100" ? : }
{children}
>
);
}