import React from 'react'; import { AppBar, Toolbar, Typography, Box, IconButton, Divider, Avatar, Button, Autocomplete, TextField, InputAdornment, useTheme, useMediaQuery, } from '@mui/material'; import { useLocation } from 'react-router-dom'; import MenuIcon from '@mui/icons-material/Menu'; import NotificationsOutlinedIcon from '@mui/icons-material/NotificationsOutlined'; import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'; import SearchIcon from '@mui/icons-material/Search'; const top100Films = [ { title: 'The Shawshank Redemption' }, { title: 'The Godfather' }, { title: 'The Dark Knight' }, { title: 'Pulp Fiction' }, ]; const KitchPlusAppBar = ({ onDrawerToggle, sidebarOpen, isMobile }) => { const location = useLocation(); const theme = useTheme(); const isSmallScreen = useMediaQuery(theme.breakpoints.down('sm')); const isMediumScreen = useMediaQuery(theme.breakpoints.between('sm', 'md')); return ( {/* Left side with toggle button */} {/* Toggle button for mobile/tablet */} {(isMobile || isMediumScreen) && ( )} {location.pathname === '/dashboard' ? ( Welcome to KitchPlus ) : ( option.title)} renderInput={(params) => ( ), }} sx={{ '& .MuiInputBase-root': { backgroundColor: 'white', height: { xs: 36, sm: 38, md: 40 }, }, }} /> )} /> )} {/* Right side */} {location.pathname === '/dashboard' && !isSmallScreen && ( )} {location.pathname === '/dashboard' && ( )} {!isSmallScreen && ( Admin@gmail.com )} ); }; export default KitchPlusAppBar;