import {breadcrumbMap} from "@/lib/breadcrumb-map"; export interface Breadcrumb { href: string; label: string; isCurrentPage: boolean; } export function getBreadcrumbs(path: string): Breadcrumb[] { const pathSegments = path.split('/').filter(Boolean); return pathSegments.map((segment, index) => { const href = `/${pathSegments.slice(0, index + 1).join('/')}`; const label = breadcrumbMap[segment.toLowerCase()] || segment .split('-') .map(word => word.charAt(0).toUpperCase() + word.slice(1)) .join(' '); return { label, href, isCurrentPage: index === pathSegments.length - 1, }; }); }