import SettingsOutlinedIcon from "@mui/icons-material/SettingsOutlined"; import SidebarHeaderControls from "./SidebarHeaderControls"; import { IconButton, Tooltip } from "@mui/material"; import { useAppContext } from "../contexts/AppContext"; import AccountPopover from "./AccountPopover"; type HeaderProps = { sidebarControl?: boolean; isSidebarOpen: boolean; toggleSidebar: () => void; }; export default function Header({ isSidebarOpen, toggleSidebar, sidebarControl = true }: HeaderProps) { const { configs, setIsSettingsOpen, appSection, headerToolbar } = useAppContext(); return (
{!isSidebarOpen && sidebarControl && (
)}

{configs?.title || 'Shraga'} {appSection && ` - ${appSection}`}

{headerToolbar && (
{headerToolbar}
)} setIsSettingsOpen(true)}>
); }