import { ComponentInterface } from '../../stencil-public-runtime'; import { MenubarItem } from '../../utils'; import { SearchEnv } from '../../utils/subjects.api'; /** * Main menubar component. Each item can have a menu with subitems * When a main menubar item is the current active one, a sub-menubar is shown and each subitem can have a menu with subitems. * @cssprop {--zanit-menubar-max-width} Maximum width of the menubar. */ export declare class ZanitMenubar implements ComponentInterface { host: HTMLZanitMenubarElement; /** Menubar items extracted from `data`. */ items: MenubarItem[]; /** ID of the currently open menu. */ openMenu: string | undefined; /** ID of the item to show the subitems navbar for. */ openNavbar: string | undefined; /** IDs of the current prop */ currentPath: string[]; isMobile: boolean; loading: boolean; /** The data to build the menu (as an array of `MenubarItem` or a JSON array) or the url to fetch to retrieve it. */ data: Promise | MenubarItem[] | URL | string; /** Path of the current item. */ current: string | undefined; /** Initial search query. */ searchQuery: string | undefined; /** Environment for search suggestions */ searchEnv: SearchEnv; /** Search area (e.g. "SCUOLA", "UNIVERSITÀ", "DIZIONARI"). */ searchArea?: string | undefined; private timerId; /** Setup the list of items. */ parseData(data: typeof this.data): Promise; onItemsChange(): void; onCurrentChange(): void; connectedCallback(): Promise; /** Close any open menu when clicking outside. */ handleOutsideClick(event: MouseEvent): void; /** Close any open menu when pressing Escape or Tab. * Uses document-level listener to ensure Escape works from any focus location within the menu. */ handleKeydown(event: KeyboardEvent): void; handleMouseover(): void; /** * Automatically close any open menu on mouseout after with a little delay. * The delay is useful to avoid immediate closing when the pointer briefly leaves the component. */ handleMouseout(event: MouseEvent): void; /** Close the menu when it loses focus. */ handleFocusout(event: FocusEvent): void; /** Fetch data from passed URL. */ private fetchData; /** Initialize tabindex on menuitems of menubars, setting -1 to all but the first one. */ private initTabindex; /** Indicates whether the element has to be highlighted by checking whether it is set as current or one of its descendants is. */ private isActive; /** Opens the menu associated with the menubar `item`, if any. */ private showMenu; /** Get all elements with `menuitem` role inside parent's `menubar`. * */ private getParentMenubarElements; /** Move the focus to the previous menubar item, or the last one. Then open its menu if any other menu was open. */ private focusPreviousItem; /** Move the focus to the next menubar item, or the first one. Then open its menu if any other menu was open. */ private focusNextItem; /** Handles keyboard navigation on menubar items. */ private handleItemKeydown; /** Get the previous element with `role=group`. */ private getPreviousGroup; /** Get the next element with `role=group`. */ private getNextGroup; private openItemMenu; /** Handles keyboard navigation events from `Menu` component. */ private handleMenuKeydown; render(): any; }