import type { DestinationConfig } from "../../core/navigation/destinations.js"; /** Creates an M3 Expressive navigation bar: three to five destinations along the bottom of a compact or medium window (Compose `ShortNavigationBar`). */ declare function createNavigationBar(config?: NavigationBarConfig): NavigationBarComponent; /** One destination of the bar: a link (`href`) or a button. */ type NavigationBarItemConfig = DestinationConfig; /** What `select` and `onSelect` carry: the destination chosen by click or keyboard. */ interface NavigationBarSelectEvent { id: string; /** The id, as ``'s `change` carries it */ value: string; index: number; originalEvent: MouseEvent; } interface NavigationBarEvents { select: NavigationBarSelectEvent; /** The bar was hidden (`hidden: true`) or shown again, by scroll or by `hide()`/`show()` */ visibility: { hidden: boolean; }; } /** Where an item puts its icon. */ type NavigationBarItemLayout = 'auto' | 'vertical' | 'horizontal'; interface NavigationBarConfig { /** Three to five destinations (M3) */ items?: NavigationBarItemConfig[]; itemLayout?: NavigationBarItemLayout; /** Hides the bar while the page scrolls down and shows it when it scrolls up, as the bottom app bar's `autoHide`. */ hideOnScroll?: boolean | { target?: HTMLElement | Window; }; /** The landmark's name; default "Primary navigation" */ ariaLabel?: string; ripple?: boolean; /** `select` listener registered at creation. */ onSelect?: (event: NavigationBarEvents["select"]) => void; class?: string; prefix?: string; componentName?: string; } interface NavigationBarComponent { element: HTMLElement; getClass: (name: string) => string; lifecycle: { destroy: () => void; }; getActive: () => string | null; /** The active destination's id, as getActive(): the value getter every component has */ getValue: () => string | null; /** Marks a destination active, silently (no `select`); `null` clears it */ setActive: (id: string | null) => NavigationBarComponent; getItems: () => NavigationBarItemConfig[]; setItems: (items: NavigationBarItemConfig[]) => NavigationBarComponent; setBadge: (id: string, badge: NavigationBarItemConfig['badge'], label?: string) => NavigationBarComponent; /** Slides the bar out of view (without the slide under reduced motion) */ hide: () => NavigationBarComponent; show: () => NavigationBarComponent; isHidden: () => boolean; on: (event: K, handler: (payload: NavigationBarEvents[K]) => void) => NavigationBarComponent; off: (event: K, handler: (payload: NavigationBarEvents[K]) => void) => NavigationBarComponent; destroy: () => void; } export type { NavigationBarComponent, NavigationBarConfig, NavigationBarEvents, NavigationBarItemConfig, NavigationBarItemLayout, NavigationBarSelectEvent }; export { createNavigationBar, createNavigationBar as default };