import type * as React from 'react'; import type { PrimitivePropsWithRef } from '../utils/primitive.js'; /** One entry of {@link BreadcrumbProps.items} — a crumb in the trail. */ export interface BreadcrumbItem { /** * Text rendered inside the derived `BreadcrumbLink` or `BreadcrumbPage`. Omit it on an * `ellipsis` entry, which renders no text of its own. * @default undefined — nothing is rendered inside the crumb. */ label?: React.ReactNode | undefined; /** * Destination of the derived `BreadcrumbLink`. Omit it and the crumb renders as a * `BreadcrumbPage` instead — the current page, not navigable. * @default undefined — rendered as a `BreadcrumbPage`. */ href?: string | undefined; /** * Marks a *link* crumb as the current page, emitting `aria-current="page"`. * A crumb with no `href` is a `BreadcrumbPage` and already carries it. * @default false */ current?: boolean | undefined; /** * Renders the collapsed-items placeholder (`…`) instead of a link or a * page. Decorative and `aria-hidden`; use it only when the collapsed crumbs * are genuinely unreachable. * @default false */ ellipsis?: boolean | undefined; } /** @internal Shared state distributed from {@link Breadcrumb} to `BreadcrumbSeparator` via context. Not part of the public API. */ export interface BreadcrumbContextValue { /** Glyph a childless `BreadcrumbSeparator` falls back to. */ separator: string; } /** Props for the {@link Breadcrumb} root. */ export interface BreadcrumbProps extends PrimitivePropsWithRef<'nav'> { /** * Accessible name written to the `