import{type TemplateResult,type PropertyValues}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import'./app-rail-item.class.js'; /** The rail's effective presentation -- see the class doc for what each renders. */ export type LyraAppRailMode='full'|'icon-only'|'mobile'; /** {@link LyraAppRailMode} plus the `'auto'` release sentinel -- broader than `forceMode`'s own * `LyraAppRailPreferredMode | 'auto'` type, since `forceMode` excludes `'mobile'` (the mobile * breakpoint is always tracked automatically and can never be pinned; see its own doc). */ export type LyraAppRailModeInput=LyraAppRailMode|'auto'; /** The non-mobile axis of {@link LyraAppRailMode} -- what `preferred-mode`/`forceMode` can * manually prefer between, since the `mobile-breakpoint` continues to be tracked automatically * regardless (see `preferredMode`'s own doc). */ export type LyraAppRailPreferredMode=Exclude; /** Whitespace-separated tokens accepted by the `persist` attribute. */ export type LyraAppRailPersistField='open'|'width'|'preferred-mode';export interface LyraAppRailModeChangeDetail{mode:LyraAppRailMode;}export interface LyraAppRailToggleDetail{open:boolean;}export interface LyraAppRailResizeDetail{widthPx:number;} /** * Pure breakpoint-to-mode resolver, kept separate from the `matchMedia` * wiring below so it's directly unit-testable without resizing a real * browser window. `mobileMatches` wins over everything else when true (the * viewport is narrower than both breakpoints at once); otherwise * `preferredMode` (when set) wins over `iconOnlyMatches` — a manual * preference for the full/icon-only axis specifically, while the mobile * breakpoint continues to be tracked automatically regardless. */ export declare function computeAppRailMode(iconOnlyMatches:boolean,mobileMatches:boolean,preferredMode?:LyraAppRailPreferredMode|null):LyraAppRailMode;export interface LyraAppRailEventMap{'lr-mode-change':CustomEvent;'lr-toggle':CustomEvent;'lr-rail-resize-request':CustomEvent;'lr-rail-resize':CustomEvent;} /** * `` — a responsive navigation rail that adapts across three * presentations as the *viewport* narrows (not this element's own inline * size — see the `mode` getter doc for why): `'full'` (nav items show * icon + label, inline), `'icon-only'` (a narrower inline rail, icons only), * and `'mobile'` (hidden behind a toggle button; opening it shows a * focus-trapped floating overlay over the page). * * Breakpoints are viewport-width `matchMedia()` queries against * `icon-only-breakpoint`/`mobile-breakpoint`, not a `ResizeObserver` on this * element — a nav rail's presentation should track the actual device/window * width the way a native OS shell's navigation does, not however much * horizontal space a particular layout happens to give it. * * The `'mobile'` state participates in the library's shared overlay stack, * which supplies focus trapping, Escape/backdrop dismissal, inerting, and * focus restoration without nesting a `` in this component's * shadow template. `[part="base"]` (the inline * `'full'`/`'icon-only'` presentation) and `[part="panel"]` (the mobile * overlay) are the *same* element promoted in place across modes (mirrors * ``'s fullscreen mode) — never both at once, and never two * separate copies of the slotted content, which slot projection can't * produce anyway (a light-DOM node is only ever assigned to one ``). * It's a plain `
` with an explicit `role="navigation"` rather than a * literal `