// @mui import { useTheme } from '@mui/material/styles'; import Stack from '@mui/material/Stack'; import AppBar from '@mui/material/AppBar'; import Toolbar from '@mui/material/Toolbar'; import IconButton from '@mui/material/IconButton'; // theme import { bgBlur } from 'src/theme/css'; // hooks import { useOffSetTop } from 'src/hooks/use-off-set-top'; import { useResponsive } from 'src/hooks/use-responsive'; // components import Logo from 'src/components/logo'; import SvgColor from 'src/components/svg-color'; import { useSettingsContext } from 'src/components/settings'; // import { HEADER, NAV } from '../config-layout'; import { Searchbar, AccountPopover, SettingsButton } from '../_common'; // ---------------------------------------------------------------------- type Props = { onOpenNav?: VoidFunction; }; export default function Header({ onOpenNav }: Props) { const theme = useTheme(); const settings = useSettingsContext(); const isNavHorizontal = settings.themeLayout === 'horizontal'; const isNavMini = settings.themeLayout === 'mini'; const lgUp = useResponsive('up', 'lg'); const offset = useOffSetTop(HEADER.H_DESKTOP); const offsetTop = offset && !isNavHorizontal; const renderContent = ( <> {lgUp && isNavHorizontal && } {!lgUp && ( )} ); return ( {renderContent} ); }