import Box from '@mui/material/Box' import Button from '@mui/material/Button' import Divider from '@mui/material/Divider' import Drawer from '@mui/material/Drawer' import Typography from '@mui/material/Typography' import { STORE_NAME } from '@/shared/config' import type { AuthUser } from '@/shared/model/auth' import type { ColorScheme, ThemeModePreference } from '@/shared/model/theme' import { BearLogo } from '@/shared/ui/BearLogo' import { ModeSwitcher } from '@/shared/ui/ModeSwitcher' import { SchemeSwitcher } from '@/shared/ui/SchemeSwitcher' type Props = { open: boolean onClose: () => void user: AuthUser | null isAdmin: boolean navItems: { label: string; to: string }[] scheme: ColorScheme mode: ThemeModePreference resolvedMode: 'light' | 'dark' onSchemeChange: (scheme: ColorScheme) => void onCycleMode: () => void onNavigate: (to: string) => void onLogout: () => void } export function NavigationDrawer({ open, onClose, user, isAdmin, navItems, scheme, mode, resolvedMode, onSchemeChange, onCycleMode, onNavigate, onLogout, }: Props) { const go = (to: string) => { onClose() onNavigate(to) } return ( {STORE_NAME} {navItems.map((i) => ( ))} {!isAdmin && ( )} {user && !isAdmin && ( )} {!isAdmin && ( )} {!user && isAdmin && ( )} {user && ( )} ) }