"use client"; import { FC } from "react"; import { usePathname } from "next/navigation"; // mobx import { observer } from "mobx-react-lite"; // ui import { Settings } from "lucide-react"; // icons import { Breadcrumbs } from "@plane/ui"; // components import { BreadcrumbLink } from "components/common"; import { SidebarHamburgerToggle } from "@/components/admin-sidebar"; export const InstanceHeader: FC = observer(() => { const pathName = usePathname(); const getHeaderTitle = (pathName: string) => { switch (pathName) { case "general": return "General"; case "ai": return "Artificial Intelligence"; case "email": return "Email"; case "authentication": return "Authentication"; case "image": return "Image"; case "google": return "Google"; case "github": return "Github"; default: return pathName.toUpperCase(); } }; // Function to dynamically generate breadcrumb items based on pathname const generateBreadcrumbItems = (pathname: string) => { const pathSegments = pathname.split("/").slice(1); // removing the first empty string. pathSegments.pop(); let currentUrl = ""; const breadcrumbItems = pathSegments.map((segment) => { currentUrl += "/" + segment; return { title: getHeaderTitle(segment), href: currentUrl, }; }); return breadcrumbItems; }; const breadcrumbItems = generateBreadcrumbItems(pathName); return (