/** Horizontal top bar with page-link nav + submenus — for a user-avatar dropdown bar instead, use NavigationBar. */ type SubItem = { /** Dropdown entry text; also its React key, so keep it unique within the parent. */ label: string; /** Only compared with Header's `active` to highlight — never navigates; route in `onClick`. */ href: string; /** Small badge above the label; colorScheme defaults to "blue". */ badge?: { /** Badge text. */ label: string; /** Chakra colour scheme of the badge; the tint is resolved against the bar background. */ colorScheme?: "blue" | "cyan" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow" | "whiteAlpha" | "blackAlpha" | undefined; }; /** Also closes the mobile menu when tapped there. */ onClick?: () => void; }; type MenuItemProp = { /** Top-level entry text; also its React key and what the hover dropdown is keyed on, so keep it unique. */ label: string; /** Only compared with Header's `active` to highlight — never navigates; route in `onClick`. */ href?: string; /** Small badge above the label; colorScheme defaults to "blue". */ badge?: { /** Badge text. */ label: string; /** Chakra colour scheme of the badge; the tint is resolved against the bar background. */ colorScheme?: "blue" | "cyan" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow" | "whiteAlpha" | "blackAlpha" | undefined; }; /** Also closes the mobile menu; with `children`, fires on desktop only — mobile tap just toggles. */ onClick?: () => void; /** Opens as a hover-only dropdown on desktop (no click/keyboard trigger) — a click-toggled accordion on mobile instead. */ children?: SubItem[]; }; /** Props for Header, the horizontal top bar; use NavigationBar for a user-avatar dropdown instead. */ export type HeaderProps = { /** Brand mark at the left of the bar; any click handling is yours to attach. */ logo: React.ReactNode; /** Top-level entries in order; an entry with `children` becomes a dropdown (desktop) or accordion (mobile). */ menuItems: MenuItemProp[]; /** Mounted once, in the bar; a valid element also receives a `closeMobileMenu` prop. */ rightSlot?: React.ReactNode; /** The `href` of the item to highlight; matched by strict equality. */ active?: string; /** Overrides the sidebar-token defaults; `active` is the underline/highlight colour, not text. */ colors?: { /** Bar background. */ bg: string; /** Default text and icon colour. */ color: string; /** Underline on the active top-level item and fill behind the active sub-item. */ active: string; /** Background of an item under the pointer. */ hover: string; /** Text colour of an item under the pointer; defaults to white. */ hoverTextColor?: string; }; /** Overrides the default "md" shadow. */ boxShadow?: string; /** Fires after the mobile menu closes via toggle, item tap, or `closeMobileMenu`. */ onMobileMenuClose?: () => void; }; /** Internal props for Header's desktop nav row; not meant for consumers. */ export type DesktopMenuProps = Pick & { /** Called with the hovered item's label, or null on pointer leave; only items with children trigger it. */ setHoveredMenu: (menu: string | null) => void; /** True when an `href` matches Header's `active`. */ isActive: (href?: string) => boolean | "" | undefined; /** Underline or fill colour of the active item. */ activeBg: string; /** Label of the item whose dropdown is open, or null. */ hoveredMenu: string | null; /** Background of an item under the pointer. */ hoverBg: string; /** Default text colour. */ color: string; /** Text colour of an item under the pointer. */ hoverTextColor?: string; /** The bar's own background — badges resolve their tint against this, never the light canvas default. */ surface: string; }; /** Internal props for Header's collapsible mobile menu panel; not meant for consumers. */ export type MobileMenuProps = Pick & Pick & { /** Expands the panel; collapsing it also closes any open submenu. */ isOpen: boolean; /** Called after a leaf item is tapped, so the host can collapse the panel. */ onClose?: () => void; }; export {};