import { memo, useState, useCallback } from 'react'; // @mui import List from '@mui/material/List'; import Stack from '@mui/material/Stack'; import Collapse from '@mui/material/Collapse'; // import { NavSectionProps, NavListProps, NavConfigProps } from '../types'; import { navVerticalConfig } from '../config'; import { StyledSubheader } from './styles'; import NavList from './nav-list'; // ---------------------------------------------------------------------- function NavSectionVertical({ data, config, sx, ...other }: NavSectionProps) { return ( {data.map((group, index) => ( ))} ); } export default memo(NavSectionVertical); // ---------------------------------------------------------------------- type GroupProps = { subheader: string; items: NavListProps[]; config: NavConfigProps; }; function Group({ subheader, items, config }: GroupProps) { const [open, setOpen] = useState(true); const handleToggle = useCallback(() => { setOpen((prev) => !prev); }, []); const renderContent = items.map((list) => ( )); return ( {subheader ? ( <> {subheader} {renderContent} ) : ( renderContent )} ); }