import { NavigationItem } from "@lumeweb/portal-framework-core"; //#region src/hooks/useBreadcrumbs.d.ts /** * Build a breadcrumb trail from the current path by walking the `parentId` * chain from the matching item back to the root. * * The returned array is ordered root-first (ancestors before descendants): * [Root, ..., Parent, Current] * * Safety: * - If no item matches `currentPath`, returns an empty array. * - If `parentId` references a non-existent parent, the walk stops at the * last found item. * - Circular `parentId` references are detected via a visited-set and broken * without infinite looping. * * @param items - Flat list of NavigationItem (with optional `parentId` chains). * @param currentPath - The route path to derive breadcrumbs for. * @returns Ordered breadcrumb array (root → current). */ declare function buildBreadcrumbs(items: NavigationItem[], currentPath: string): NavigationItem[]; /** * Hook that derives breadcrumb data from the navigation tree by walking the * `parentId` chain from the current path to the root. * * Memoized via `useMemo` — returns a stable reference when `items` and * `currentPath` are unchanged across re-renders. * * @param items - Flat list of NavigationItem. * @param currentPath - The route path to derive breadcrumbs for. * @returns Ordered breadcrumb array (root → current), or empty array if * no item matches the path. */ declare function useBreadcrumbs(items: NavigationItem[], currentPath: string): NavigationItem[]; //#endregion export { buildBreadcrumbs, useBreadcrumbs }; //# sourceMappingURL=useBreadcrumbs.d.ts.map