import { AnimationEvent } from '@angular/animations'; import { FocusKeyManager, FocusOrigin } from '@angular/cdk/a11y'; import { CdkPortal, CdkPortalOutlet } from '@angular/cdk/portal'; import { AfterContentInit, ElementRef, EventEmitter, OnDestroy, QueryList } from '@angular/core'; import { TypeRef } from '@sbb-esta/angular-core/common-behaviors'; import { SbbHeaderMenuItem } from '../header-menu-item/header-menu-item.directive'; import type { SbbHeader } from '../header/header.component'; export declare class SbbHeaderMenu implements AfterContentInit, OnDestroy { private _elementRef; _header: TypeRef; /** Unique ID to be used by menu trigger's "aria-owns" property. */ id: string; /** Event emitted when the menu is closed. */ readonly closed: EventEmitter; /** Reference to the menu items. */ _items: QueryList; /** @docs-private */ _panelPortal: CdkPortal; /** @docs-private */ _panelPortalOutlet: CdkPortalOutlet; /** Whether the menu panel is open. */ get open(): boolean; set open(value: boolean); private _open; /** * This method takes classes set on the host sbb-header-menu element and applies them on the * menu template that displays in the overlay container. Otherwise, it's difficult * to style the containing menu from outside the component. * @param classes list of class names */ set panelClass(classes: string); private _previousPanelClass; /** Whether the autocomplete panel should be visible, depending on option length. */ showPanel: boolean; /** Manages active item in item list based on key events. */ _keyManager: FocusKeyManager; /** Class list for the panel. */ _classList: { [key: string]: boolean; }; /** @docs-private */ _panel: CdkPortal | null; /** @docs-private */ _animationState: 'closed' | 'open-panel' | 'open-menu'; /** Subscription to tab events on the menu panel */ private _tabSubscription; private _destroyed; constructor(_elementRef: ElementRef, _header: TypeRef); ngAfterContentInit(): void; ngOnDestroy(): void; /** * Focus the first item in the menu. * @param origin Action from which the focus originated. Used to set the correct styling. */ focusFirstItem(origin?: FocusOrigin): void; /** * Resets the active item in the menu. This is used when the menu is opened, allowing * the user to start from the first option when pressing the down arrow. */ resetActiveItem(): void; _onAnimationDone(event: AnimationEvent): void; _handleMenuKeydown(event: TypeRef): void; /** Handle a keyboard event from the menu, delegating to the appropriate action. */ _handlePanelKeydown(event: KeyboardEvent): void; }