import { NotificationsOutlined } from '@mui/icons-material'; import { Avatar, Badge, Box, IconButton, Menu, MenuItem, Tooltip, Typography, } from '@mui/material'; import { useState } from 'react'; import styles from './styles'; function Toolbar({ title, layoutType, avatarMenuOptions }) { const { box, menuBoxContainer, menuBox, notificationIconButton, menuNotifications, menuUser, } = styles[layoutType]; const [anchorElUser, setAnchorElUser] = useState(null); const [anchorElNotifications, setAnchorElNotifications] = useState(null); if (layoutType === 'desktop') { return ( {title} setAnchorElNotifications(e.currentTarget)} sx={notificationIconButton} > 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={notificationIconButton} > setAnchorElNotifications(null)} > setAnchorElNotifications(null)}> Notificacoes setAnchorElUser(e.currentTarget)} sx={{ p: 0 }} > setAnchorElUser(null)} > {avatarMenuOptions.map(option => ( {option.text} ))} ); } } export default Toolbar;