import { ReactNode } from "react" // next/link components import Link from "next/link" // @mui material components import { Breadcrumbs as MuiBreadcrumbs } from "@mui/material" import Icon from "@mui/material/Icon" // ThreeD Garden components import MDBox from "~/components/mui/MDBox" import MDTypography from "~/components/mui/MDTypography" // Declaring + Typechecking props types for the Breadcrumbs interface Props { icon: ReactNode title: string route: string | string[] light?: boolean [key: string]: any } function Breadcrumbs({ icon, title, route, light }: Props): JSX.Element { const routes: string[] | any = route.slice(0, -1) const word = title || "Home" return ( light ? white.main : grey[600], }, }}> {icon} {/* Home */} {routes.map((el: string) => ( {el} ))} {word.replace("-", " ")} {/* {word.replace("-", " ")} */} ) } // Declaring default props for Breadcrumbs Breadcrumbs.defaultProps = { light: false, } export default Breadcrumbs