import {NextLinkComposed} from "@/core/components/LinkRouting"; import ExpandLess from "@mui/icons-material/ExpandLess"; import ExpandMore from "@mui/icons-material/ExpandMore"; import {Badge, IconButton, ListItem, ListItemButton, ListItemIcon, ListItemText, Typography,} from "@mui/material"; import {useTranslations} from "next-intl"; import {Fragment} from "react"; import SidebarListSubItem from "./SidebarListSubItem"; import useNotification from "@/lib/app/hooks/useNotification"; const SidebarListItem = ({item, dispatch, handleDrawerToggle}) => { const t = useTranslations(); const {notification_count} = useNotification() console.log(notification_count) return ( }> { if (item.type == "menu") { dispatch({type: "COLLAPSE_MENU", key: item.key}); } handleDrawerToggle(); }} sx={{ minHeight: 48, }} > {item.icon} {t(item.secondary)} ) : null } /> {item.type == "menu" && (item.showSubItem ? : )} {item.subItem && ( )} ); }; export default SidebarListItem;