import { ElementRef, OnDestroy, Renderer2 } from '@angular/core';
import { RtlService } from '@fundamental-ngx/cdk/utils';
import { Observable } from 'rxjs';
import { MenuItemComponent } from '../menu-item/menu-item.component';
import { MenuComponent } from '../menu.component';
import * as i0 from "@angular/core";
interface MenuNode {
    item: MenuItemComponent | null;
    parent: MenuNode | null;
    children: MenuNode[];
}
/** `null` key is used for the root node */
type MenuMap = Map<MenuItemComponent | null, MenuNode>;
export declare class MenuService implements OnDestroy {
    private _renderer;
    private readonly _rtlService;
    /** Map of menu items to menu nodes */
    menuMap: MenuMap;
    /** Currently focused node */
    focusedNode: MenuNode | undefined;
    /** Collection of active menu nodes */
    activeNodePath: MenuNode[];
    /** Collection of active menu nodes */
    private _isMobileMode;
    /** @hidden */
    private _menuComponent;
    /** @hidden */
    private _destroyKeyboardHandlerListener;
    /** @hidden */
    get _isRtl(): boolean;
    /** @hidden */
    constructor(_renderer: Renderer2, _rtlService: RtlService);
    /** Reference to menu component */
    get menuComponent(): MenuComponent;
    /** Returns menu mode observable */
    get isMobileMode(): Observable<boolean>;
    /** Sets menu mode */
    setMenuMode(value: boolean): void;
    /** Sets given menu item as focused */
    setFocused(menuItem: MenuItemComponent | null): void;
    /**
     * Sets state of a given menu item
     * @param isActive - Whether should be set as active or inactive
     * @param menuItem `MenuItemComponent` that should be set as active or inactive
     */
    setActive(isActive: boolean, menuItem: MenuItemComponent | null): void;
    /**
     * Close active sibling submenu if any
     * @param menuItem to look for active siblings
     */
    setInactiveSiblingMenuItem(menuItem: MenuItemComponent): void;
    /** Initializes menu service based on given Menu Component */
    setMenuComponent(menu: MenuComponent): void;
    /** Clears Active Node Path and resets Focused Node */
    resetMenuState(): void;
    /** - Updates the structure of the menu
     *  - Validates Active Node Path
     *  - Validates Focused Node */
    rebuildMenu(): void;
    /** Adds Menu keyboard support */
    addKeyboardSupport(elementRef: ElementRef): void;
    /** Removes Menu keyboard support */
    removeKeyboardSupport(): void;
    /** @hidden */
    ngOnDestroy(): void;
    /** @hidden Returns siblings of given node */
    private _nodeSiblings;
    /** @hidden Adds given element to the Active Node Path and setts as active*/
    private _addToActivePath;
    /** @hidden Removes given element and all its successors from the Active Node Path and setts as inactive*/
    private _removeFromActivePath;
    /** @hidden Removes all elements from the Active Node Path and sets them as closed */
    private _clearActivePath;
    /** @hidden
     * - Builds Menu Nodes based on Menu Items
     * - Creates Map of the Menu Nodes */
    private _buildMenuMap;
    /** @hidden Removes active sibling of a given menu item from the Active Path */
    private _removeActiveSibling;
    /** @hidden Adds keyboard support */
    private _setKeyboardSupport;
    /** @hidden */
    private _handleKey;
    /** @hidden Emits an array of active menu items */
    private _emitActivePath;
    /** @hidden Depending on direction returns closest enabled sibling of given node */
    private _closestEnabled;
    static ɵfac: i0.ɵɵFactoryDeclaration<MenuService, [null, { optional: true; }]>;
    static ɵprov: i0.ɵɵInjectableDeclaration<MenuService>;
}
export {};
