import { useMemo, useState } from 'react';
// material-ui
import {
Box,
useMediaQuery,
Stack,
Tooltip,
IconButton,
Popper,
ClickAwayListener,
List,
ListItem,
ListItemButton,
ListItemText,
Grid,
ListItemIcon,
Typography
} from '@mui/material';
import { TbBoxMultiple1 } from 'react-icons/tb';
import { GrMultiple } from 'react-icons/gr';
import { TbUserEdit } from 'react-icons/tb';
import Transitions from 'components/@extended/Transitions';
// project import
import Search from './Search';
import Message from './Message';
import Profile from './Profile';
import Notification from './Notification';
import MobileSection from './MobileSection';
import MegaMenuSection from './MegaMenuSection';
import { useNavigate } from 'react-router';
import SportsMotorsportsOutlinedIcon from '@mui/icons-material/SportsMotorsportsOutlined';
import {
MailOutlined,
// DashboardOutlined,
UserOutlined,
CustomerServiceOutlined,
WindowsOutlined
} from '@ant-design/icons';
import { useTheme } from '@mui/material/styles';
// ==============================|| HEADER - CONTENT ||============================== //
const HeaderContent = () => {
const matchesXs = useMediaQuery((theme) => theme.breakpoints.down('md'));
// eslint-disable-next-line react-hooks/exhaustive-deps
const megaMenu = useMemo(() => , []);
const [open, setOpen] = useState(false);
const [anchorEl, setAnchorEl] = useState(null);
const theme = useTheme();
// eslint-disable-next-line react-hooks/exhaustive-deps
// const megaMenu = useMemo(() => , []);
const iconBackColorOpen = 'grey.300';
const iconBackColor = 'grey.100';
const navigate = useNavigate();
const handleToggle = (e) => {
setOpen(!open);
setAnchorEl(e.currentTarget);
};
const handleClickAway = () => {
setOpen(false);
};
return (
<>
{/* {!matchesXs && } */}
{/* {!matchesXs && megaMenu} */}
{localStorage.getItem('firstname') || ''}
{matchesXs && }
{/* */}
{/* */}
{
// console.log(const location = useLocation();)
navigate('/nearle/orders/create');
handleClickAway();
}}
>
Create Order
}
/>
{
// console.log(const location = useLocation();)
navigate('/nearle/orders/createorders');
handleClickAway();
}}
>
Create Multiple Order
}
/>
{
navigate('/nearle/customer/create');
handleClickAway();
}}
>
Create Customer
}
/>
{/* {
navigate('/clients/create')
handleClickAway()
}} >
Create Client
}
/>
*/}
{/* {
navigate('/riders/create')
handleClickAway()
}} >
Create Rider
}
/>
*/}
{/*
{
navigate('/create_order')
handleClickAway()
}}>
{
navigate('/create_client')
handleClickAway()
}}>
{
navigate('/create_staff')
handleClickAway()
}}>
*/}
{/* */}
{/* */}
{/* {!matchesXs && }
{matchesXs && } */}
>
);
};
export default HeaderContent;