import { NotificationsOutlined } from '@mui/icons-material'; import { Avatar, Badge, Box, IconButton, Menu, MenuItem, Tooltip, Typography, } from '@mui/material'; import { useState } from 'react'; function Toolbar({ title, layoutType, avatarMenuOptions }) { const [anchorElUser, setAnchorElUser] = useState(null); const [anchorElNotifications, setAnchorElNotifications] = useState(null); if (layoutType === 'desktop') { return ( {title} setAnchorElNotifications(e.currentTarget)} sx={{ p: 2 }} > setAnchorElNotifications(null)} > setAnchorElNotifications(null)}> Notificacoes setAnchorElUser(e.currentTarget)} sx={{ p: 0 }} > setAnchorElUser(null)} > {avatarMenuOptions.map(option => ( {option.text} ))} ); } else if (layoutType === 'mobile') { return ( {title} setAnchorElNotifications(e.currentTarget)} sx={{ p: 2 }} > setAnchorElNotifications(null)} > setAnchorElNotifications(null)}> Notificacoes setAnchorElUser(e.currentTarget)} sx={{ p: 0 }} > setAnchorElUser(null)} > {avatarMenuOptions.map(option => ( {option.text} ))} ); } } const box = { display: 'flex', marginLeft: '230px', height: '130px', justifyContent: 'space-between', alignItems: 'center', padding: '0 70px', borderBottom: '3px solid #CFCFCF', }; const mobileBox = { ...box, marginLeft: 0, height: '70px', padding: '0 10px', justifyContent: 'space-around', }; export default Toolbar;