/** * @license * Copyright 2023 Nuraly, Laabidi Aymen * SPDX-License-Identifier: MIT */ import { BaseMenuController } from './base.controller.js'; import type { MenuStateController } from '../interfaces/index.js'; /** * State controller manages all state for the menu component * Centralizes state management for selection, submenus, hover, and highlight states */ export declare class StateController extends BaseMenuController implements MenuStateController { private _selectedPath; private _openSubMenus; private _hoveredSubMenus; private _highlightedSubMenus; /** * Get the currently selected path */ get selectedPath(): number[]; /** * Set the currently selected path */ set selectedPath(path: number[]); /** * Get the set of open submenu paths */ get openSubMenus(): Set; /** * Get the set of hovered submenu paths */ get hoveredSubMenus(): Set; /** * Get the set of highlighted submenu paths */ get highlightedSubMenus(): Set; /** * Set the selected path and trigger update * @param path - The path to select */ setSelectedPath(path: number[]): void; /** * Toggle a submenu open/closed state * @param path - The path to the submenu */ toggleSubMenu(path: number[]): void; /** * Open a submenu * @param path - The path to the submenu */ openSubMenu(path: number[]): void; /** * Close a submenu * @param path - The path to the submenu */ closeSubMenu(path: number[]): void; /** * Close all open submenus */ closeAllSubMenus(): void; /** * Set the hovered state of a submenu * @param path - The path to the submenu * @param hovered - Whether the submenu is hovered */ setHovered(path: number[], hovered: boolean): void; /** * Set the highlighted state of a submenu * @param path - The path to the submenu * @param highlighted - Whether the submenu is highlighted */ setHighlighted(path: number[], highlighted: boolean): void; /** * Clear all highlighted states */ clearHighlights(): void; /** * Check if a path is currently selected * @param path - The path to check * @returns True if the path is selected */ isPathSelected(path: number[]): boolean; /** * Check if a submenu is open * @param path - The path to check * @returns True if the submenu is open */ isSubMenuOpen(path: number[]): boolean; /** * Check if a submenu is hovered * @param path - The path to check * @returns True if the submenu is hovered */ isSubMenuHovered(path: number[]): boolean; /** * Check if a submenu is highlighted * @param path - The path to check * @returns True if the submenu is highlighted */ isSubMenuHighlighted(path: number[]): boolean; /** * Reset all state to initial values */ reset(): void; } //# sourceMappingURL=state.controller.d.ts.map