import React from 'react'; // material-ui import { useTheme } from '@mui/material/styles'; import { Divider, List, Typography } from '@mui/material'; // project imports import NavItem from '../NavItem'; import NavCollapse from '../NavCollapse'; import { GenericCardProps } from 'types'; // ==============================|| SIDEBAR MENU LIST GROUP ||============================== // export interface NavGroupProps { item: { id?: string; type?: string; icon?: GenericCardProps['iconPrimary']; children?: NavGroupProps['item'][]; title?: React.ReactNode | string; caption?: React.ReactNode | string; color?: 'primary' | 'secondary' | 'default' | undefined; }; } const NavGroup = ({ item }: NavGroupProps) => { const theme = useTheme(); // menu list collapse & items const items = item.children?.map((menu) => { switch (menu.type) { case 'collapse': return ; case 'item': return ; default: return ( Menu Items Error ); } }); return ( <> {item.title} {item.caption && ( {item.caption} )} ) } > {items} {/* group divider */} ); }; export default NavGroup;