import { Anchor, Box, Burger, Group, Indicator, Menu, UnstyledButton, rem, } from '@mantine/core'; import { IconBell, IconChevronRight, IconLogout, IconUserCircle, } from '@tabler/icons-react'; import type { ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; import { LanguageSwitcher } from './LanguageSwitcher'; import { ColorSchemeToggle } from './ColorSchemeToggle'; import { BrandAvatar } from './BrandAvatar'; export interface Breadcrumb { label: string; path: string; } interface AppHeaderProps { onToggleNav: () => void; onToggleSidebar: () => void; navOpened: boolean; breadcrumbs: Breadcrumb[]; onNavigate: (path: string) => void; onLogout: () => void; userName?: string; userInitials?: string; supportedLanguages: readonly string[]; onNotificationsClick?: () => void; notificationCount?: number; /** * Rendered at the far left. The sidebar layout carries the brand in the * sidebar itself; the top-bar layout has no sidebar, so it passes the brand * here rather than leaving the chrome unbranded. */ brand?: ReactNode; /** * Breakpoint from which the burger is hidden. The top-bar layout only needs * it on small screens, where the drawer replaces the nav strip. */ burgerHiddenFrom?: string; } export function AppHeader({ onToggleNav, onToggleSidebar, navOpened, breadcrumbs, onNavigate, onLogout, userName = 'User', userInitials = '?', supportedLanguages, onNotificationsClick, notificationCount, brand, burgerHiddenFrom, }: AppHeaderProps) { const isMobile = typeof window !== 'undefined' && window.innerWidth < 768; return ( {brand} {/* Hamburger — styled like user-management Top.tsx */} {/* The Burger itself owns the click so the control is a real, keyboard reachable