import * as _angular_core from '@angular/core'; import { WrIconName } from 'ngwr/icon'; /** * @license * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE */ /** A single navigable entry. */ interface WrSidebarItem { readonly title: string; /** Router commands array — passed to `[routerLink]`. */ readonly url: readonly (string | number)[]; readonly icon?: WrIconName; /** Optional trailing badge text (e.g. `'new'`, `'12'`). */ readonly badge?: string; /** Render as disabled (no navigation). */ readonly disabled?: boolean; } /** Expandable group of items. */ interface WrSidebarGroup { readonly title: string; readonly icon?: WrIconName; readonly children: readonly WrSidebarItem[]; /** Open by default. @default false */ readonly defaultOpen?: boolean; } /** Either a direct-link item or an expandable group. */ type WrSidebarEntry = WrSidebarItem | WrSidebarGroup; declare function isGroup(entry: WrSidebarEntry): entry is WrSidebarGroup; /** * Data-driven sidebar nav. Pass `[entries]` — either flat * `WrSidebarItem`s (direct links) or `WrSidebarGroup`s (expand to reveal * child items). Active route auto-expands its containing group. * * @example * ```html * * ``` * * @see https://ngwr.dev/components/sidebar */ declare class WrSidebar { readonly entries: _angular_core.InputSignal; /** Default icon for entries without one. @default 'folder' */ readonly defaultGroupIcon: _angular_core.InputSignal; /** Default icon for items without one. @default 'caret-forward' */ readonly defaultItemIcon: _angular_core.InputSignal; /** Auto-expand the group containing the active route. @default true */ readonly autoExpand: _angular_core.InputSignalWithTransform; protected readonly isGroup: typeof isGroup; private readonly opened; private readonly router; private readonly currentUrl; /** Last URL we auto-expanded — prevents re-opening a group the user collapsed. */ private lastAutoUrl; constructor(); protected isOpen(title: string): boolean; /** Stable id for the group body, referenced by the toggle's `aria-controls`. */ protected groupBodyId(title: string): string; protected toggleGroup(title: string): void; protected asItem(entry: WrSidebarEntry): WrSidebarItem; protected asGroup(entry: WrSidebarEntry): WrSidebarGroup; private findGroupForUrl; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } export { WrSidebar }; export type { WrSidebarEntry, WrSidebarGroup, WrSidebarItem };