import { NavLink as RouterLink } from 'react-router-dom';
// @mui
import { Box, Link, ListItemText } from '@mui/material';
// type
import { NavItemProps } from '../type';
//
import Iconify from '../../Iconify';
import { ListItemStyle, ListItemTextStyle, ListItemIconStyle } from './style';
import { isExternalLink } from '..';
// ----------------------------------------------------------------------
export function NavItemRoot({ item, isCollapse, open = false, active, onOpen }: NavItemProps) {
const { title, path, icon, info, children } = item;
const renderContent = (
<>
{icon && {icon}}
{!isCollapse && (
<>
{info && info}
{children && }
>
)}
>
);
if (children) {
return (
{renderContent}
);
}
return isExternalLink(path) ? (
{renderContent}
) : (
{renderContent}
);
}
// ----------------------------------------------------------------------
type NavItemSubProps = Omit;
export function NavItemSub({ item, open = false, active = false, onOpen }: NavItemSubProps) {
const { title, path, info, children } = item;
const renderContent = (
<>
{info && info}
{children && }
>
);
if (children) {
return (
{renderContent}
);
}
return isExternalLink(path) ? (
{renderContent}
) : (
{renderContent}
);
}
// ----------------------------------------------------------------------
type DotIconProps = {
active: boolean;
};
export function DotIcon({ active }: DotIconProps) {
return (
theme.transitions.create('transform', {
duration: theme.transitions.duration.shorter,
}),
...(active && {
transform: 'scale(2)',
bgcolor: 'primary.main',
}),
}}
/>
);
}
// ----------------------------------------------------------------------
type ArrowIconProps = {
open: boolean;
};
export function ArrowIcon({ open }: ArrowIconProps) {
return (
);
}