import { memo } from 'react'; import type { CSSProperties } from 'react'; import { Link } from 'react-router'; import NavigateNextIcon from '@mui/icons-material/NavigateNext'; import { Avatar, Box, ListItem, ListItemAvatar, ListItemButton, ListItemIcon, ListItemText } from '@mui/material'; import type { SvgIconProps } from '@mui/material'; interface ListMenuItemProps { icon: React.ComponentType; bgcolor?: string; label: string; text: string; to?: string; disabled?: boolean; badge?: boolean; } const iconStyles: CSSProperties = { justifyContent: 'right', color: 'lightblue', verticalAlign: 'middle' }; const Badge = () => ( ); const RenderIcon = memo( ({ icon: Icon, bgcolor, label, text, badge }: ListMenuItemProps) => ( <> {label} {badge && } } secondary={text} /> ) ); const LayoutMenuItem = ({ icon, bgcolor, label, text, to, disabled, badge }: ListMenuItemProps) => ( <> {to && !disabled ? ( } > ) : ( )} ); export default memo(LayoutMenuItem);