import { useRef, useState } from 'react'; // material-ui import { useTheme } from '@mui/material/styles'; import { Avatar, Badge, Box, ClickAwayListener, Divider, List, ListItemButton, ListItemAvatar, ListItemText, ListItemSecondaryAction, Paper, Popper, Tooltip, Typography, useMediaQuery } from '@mui/material'; // project import import MainCard from 'components/MainCard'; import IconButton from 'components/@extended/IconButton'; import Transitions from 'components/@extended/Transitions'; import { ThemeMode } from 'config'; // assets import { BellOutlined, CheckCircleOutlined, GiftOutlined, MessageOutlined, SettingOutlined } from '@ant-design/icons'; // sx styles const avatarSX = { width: 36, height: 36, fontSize: '1rem' }; const actionSX = { mt: '6px', ml: 1, top: 'auto', right: 'auto', alignSelf: 'flex-start', transform: 'none' }; // ==============================|| HEADER CONTENT - NOTIFICATION ||============================== // const Notification = () => { const theme = useTheme(); const matchesXs = useMediaQuery(theme.breakpoints.down('md')); const anchorRef = useRef(null); const [read, setRead] = useState(0); const [open, setOpen] = useState(false); const handleToggle = () => { setOpen((prevOpen) => !prevOpen); }; const handleClose = (event) => { if (anchorRef.current && anchorRef.current.contains(event.target)) { return; } setOpen(false); }; const iconBackColorOpen = theme.palette.mode === ThemeMode.DARK ? 'grey.200' : 'grey.300'; const iconBackColor = theme.palette.mode === ThemeMode.DARK ? 'background.default' : 'grey.100'; return ( {({ TransitionProps }) => ( {read > 0 && ( setRead(0)}> )} } > 0}> It's{' '} Cristina danny's {' '} birthday today. } secondary="2 min ago" /> 3:00 AM 0}> Aida Burg {' '} commented your post. } secondary="5 August" /> 6:00 PM Your Profile is Complete   60% {' '} } secondary="7 hours ago" /> 2:45 PM C Cristina Danny {' '} invited to join{' '} Meeting. } secondary="Daily scrum meeting time" /> 9:10 PM View All } /> )} ); }; export default Notification;