import { ReactElement } from 'react';
import { Link as RouterLink } from 'react-router-dom';
// @mui
import {
Box,
Link,
Typography,
BreadcrumbsProps,
Breadcrumbs as MUIBreadcrumbs,
} from '@mui/material';
// ----------------------------------------------------------------------
type TLink = {
href?: string;
name: string;
icon?: ReactElement;
};
export interface Props extends BreadcrumbsProps {
links: TLink[];
activeLast?: boolean;
}
export default function Breadcrumbs({ links, activeLast = false, ...other }: Props) {
const currentLink = links[links.length - 1].name;
const listDefault = links.map((link) =>