import { type ChildAttribute, type Html } from 'foldkit/html';
/** Per-item render info passed to the consumer's `toView`. Generic over
* `Value extends string`: the item value is typed as the consumer's union
* (typically a route tag) so `toView` can switch on it without casting. */
export type ItemInfo = Readonly<{
value: Value;
index: number;
isCurrent: boolean;
link: ReadonlyArray;
}>;
/** Render-time payload published to the consumer's `toView`.
*
* - `nav`: ARIA attributes for the wrapping navigation landmark. Carries
* `aria-label` only; the `` element already supplies the navigation
* role, so spread this onto an `h.nav`.
* - `items`: one entry per `viewInputs.items`, in the same order, each with
* the anchor's attribute bundle and derived current state. */
export type RenderInfo = Readonly<{
nav: ReadonlyArray;
items: ReadonlyArray>;
}>;
/** View inputs for `Nav.view`. Generic over `Value extends string` so the
* consumer's section/route union flows into `toView`, `toHref`, and
* `isItemCurrent` without casting. */
export type ViewInputs = Readonly<{
items: ReadonlyArray;
ariaLabel: string;
toHref: (value: Value, index: number) => string;
isItemCurrent: (value: Value, index: number) => boolean;
toView: (render: RenderInfo) => Html;
}>;
/** Renders a navigation landmark whose items are links, marking the current
* destination with `aria-current="page"`. Stateless: the current item is
* derived from `isItemCurrent`, which the consumer drives from the URL, the
* single source of truth for which page is showing.
*
* Use this for URL-driven navigation where each section is a separate
* route with its own URL, deep-linking, and browser-history behavior.
* Reach for `Tabs` instead when switching content within a single page;
* `Tabs` carries the `tablist`/`tab`/`tabpanel` semantics, which are
* wrong for URL-driven navigation.
*
* Headless: `toView` owns all markup, spreading the `nav` bundle onto an
* `h.nav` and each `item.link` bundle onto an `h.a`. Keyboard support is the
* browser's native link handling (Tab to move, Enter to follow); no roving
* tabindex is imposed, since that is a composite-widget pattern, not a
* navigation-landmark one. */
export declare const view: (viewInputs: ViewInputs) => Html;
//# sourceMappingURL=index.d.ts.map