import { ForgeAiDropdownMenuItemComponent } from './ai-dropdown-menu-item.js'; /** * Controller class to handle keyboard navigation for dropdown menus. * * This controller manages all aspects of keyboard navigation within dropdown menus, * including focus management, selection state, and keyboard event delegation. * It supports both parent dropdown menus and nested submenus with proper * navigation isolation and event bubbling control. * * @example * ```typescript * const controller = new DropdownNavigationController( * hostElement, * () => getMenuItems(), * (index) => selectItem(index), * () => closeDropdown(), * () => openDropdown(), * () => isSubmenu() * ); * * // Handle keyboard events * controller.handleKeyDown(keyboardEvent, isOpen, triggerButton); * ``` */ export declare class DropdownNavigationController { private _host; private _getMenuItems; private _onItemSelect; private _onClose; private _onOpen; private _isSubmenu; private _selectedIndex; private _openedViaKeyboard; constructor(_host: HTMLElement, _getMenuItems: () => ForgeAiDropdownMenuItemComponent[], _onItemSelect: (index: number) => void, _onClose: () => void, _onOpen: () => void, _isSubmenu: () => boolean); /** * Gets the current selected index */ get selectedIndex(): number; /** * Sets the selected index */ set selectedIndex(value: number); /** * Gets whether the dropdown was opened via keyboard */ get openedViaKeyboard(): boolean; /** * Sets whether the dropdown was opened via keyboard */ set openedViaKeyboard(value: boolean); /** * Handles keyboard events for the dropdown menu */ handleKeyDown(event: KeyboardEvent, isOpen: boolean, triggerButton: HTMLElement): boolean; /** * Moves the selection by the specified direction */ private _moveSelection; /** * Updates the focus state of menu items */ private _updateItemFocus; /** * Focuses the first item in the menu */ focusFirstItem(): void; /** * Clears focus from all menu items */ clearItemFocus(): void; /** * Resets the navigation state when dropdown opens */ onOpen(): void; /** * Resets the navigation state */ reset(): void; }