import { type ReactNode } from 'react'; import type { ComboboxItems } from './comboboxItems.js'; /** One step of the trail to the current page. */ export interface Breadcrumb { /** Empty while the name is still loading: the trail shows a placeholder. */ label: string; href?: string | undefined; /** Before the label, such as the section a page belongs to; also beside * the crumb's row once it folds into the "…" menu. */ icon?: ReactNode; /** Lets the last crumb switch to one of its siblings, such as another of a * team's cycles: it opens a searchable list of them. Ignored on any other * crumb. */ switcher?: BreadcrumbSwitcher | undefined; } /** The siblings the last crumb can switch to, and the one it is. */ export interface BreadcrumbSwitcher { items: ComboboxItems; /** The item the crumb is, which the list marks and opens on. */ value: string; /** Called with another item's value when the reader picks it. */ onValueChange: (value: string) => void; /** Names the list and the crumb's button, such as "Switch cycle". */ label: string; /** The list's search placeholder, such as "Find a cycle". */ placeholder?: string | undefined; } export interface BreadcrumbsProps { /** The trail, ending with where the reader is. A crumb with an empty label, * such as a name still loading, shows a placeholder. */ crumbs: readonly Breadcrumb[]; /** Goes to a crumb that has no `href`: a place with no URL, such as a folder * in a view that keeps its path out of the URL. A crumb with a URL takes * `href` instead, so it opens in a new tab. Without either, a crumb is * text. */ onSelect?: ((crumb: Breadcrumb, index: number) => void) | undefined; /** What the last crumb is: the page itself, or a place within the page, such * as the open folder. */ current?: 'page' | 'location' | undefined; /** Makes the last crumb the page's `h1`, as `PageHeader` does. A page has * one. It wraps rather than truncating: a heading can't take focus, so a * tooltip would leave the rest of the name to a mouse. */ heading?: boolean | undefined; /** Names the landmark; the strings' `breadcrumb` by default. */ label?: string | undefined; className?: string | undefined; } /** * The trail to where the reader is, as a list in a `nav` landmark. A trail too * wide for its room folds its ancestors into a "…" menu, keeping the parent * when the whole last crumb fits beside it. Once every ancestor has folded, a * last crumb still too wide truncates, with its full name on hover, or wraps * when it is the heading. In a flex row its room is what the row's other items * leave it; elsewhere it fills its container's width. */ export declare function Breadcrumbs({ crumbs, onSelect, current, heading, label, className, }: BreadcrumbsProps): import("react").JSX.Element;