import { IconName } from '../nv-icon/nv-icons'; /** * A navigation item in the sidebar. Can be a simple link or a collapsible parent with sub-items. * @slot default - The link or content of the item (usually an tag). * @slot subitems - Sub-navigation items (nv-sidebarnavsubitem elements). Automatically assigned. * @slot trailing - Optional content displayed at the end of the item (e.g., badges, icons, chevron). */ export declare class NvSidebarnavitem { el: HTMLNvSidebarnavitemElement; /****************************************************************************/ /** * Optional icon to display before the label. * @icon */ readonly icon?: `${IconName}`; /** * Whether this item represents the active/current page. * Can be set automatically when a sub-item becomes active. */ active: boolean; /** * Whether this item can be collapsed/expanded (has sub-items). */ readonly collapsible: boolean; /** * Whether the collapsible item is currently open (showing sub-items). */ open: boolean; /** * Number of notifications to display. When provided, a notification bullet will be automatically rendered. * The bullet will be positioned in the trailing slot when sidebar is open, and on the icon when collapsed. */ readonly notificationCount?: number; /****************************************************************************/ private hasSubitems; private isSidebarCollapsed; private mutationObserver?; private subitemsMutationObserver?; private wasActiveFromSubitem; /****************************************************************************/ private handleToggle; private subitemsRef?; private isAnimating; private hasInitializedHeight; /** Tracks the last open state that was animated to, to prevent redundant animations */ private lastAnimatedOpenState; private updateSubitemsHeight; private checkSidebarCollapsed; /** * Checks if any sub-item is active and updates parent active state. * - When sidebar is collapsed: if a sub-item is active, parent should be active * - When sidebar is expanded: if a sub-item is active AND parent is not open, parent should be active * (because sub-items are hidden, we need to indicate the parent contains an active child) */ private updateActiveFromSubitems; /****************************************************************************/ componentWillLoad(): void; disconnectedCallback(): void; /****************************************************************************/ onOpenChanged(newValue: boolean, oldValue: boolean): void; /****************************************************************************/ render(): any; }