@pagamio/frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
29 lines (28 loc) • 1.13 kB
TypeScript
import type { FC, PropsWithChildren } from 'react';
import type { AppSidebarPageItem } from './SidebarContext';
interface AppBreadcrumb {
label: string;
path?: string;
key?: string;
}
interface AppBreadcrumbContextType {
breadcrumbs: AppBreadcrumb[];
pathname: string;
updateBreadcrumb: (key: string, newLabel: string) => void;
rootPageIcon: FC | undefined;
}
interface AppBreadcrumbProviderProps extends PropsWithChildren {
pathname: string;
pages: AppSidebarPageItem[];
/**
* Compatibility mode for different breadcrumb behaviors
* - 'conservative' (default): Only make links clickable if confident they exist
* - 'permissive': Make all non-final breadcrumbs clickable (legacy behavior)
*/
mode?: 'conservative' | 'permissive';
}
declare const AppBreadcrumbProvider: ({ children, pathname, pages, mode }: AppBreadcrumbProviderProps) => import("react/jsx-runtime").JSX.Element;
declare const useAppBreadcrumbs: () => AppBreadcrumbContextType;
export default AppBreadcrumbProvider;
export { useAppBreadcrumbs };
export type { AppBreadcrumbContextType, AppBreadcrumb };