/*!
 * Copyright 2020 VMware, Inc.
 * SPDX-License-Identifier: BSD-2-Clause
 */
import { AfterViewInit, OnDestroy, Renderer2 } from '@angular/core';
import { DropdownFocusHandlerService } from './dropdown-focus-handler.service';
import { DropdownComponent } from './dropdown.component';
/**
 * Arrow keys directions
 */
export declare enum Direction {
    UP = "up",
    DOWN = "down",
    LEFT = "left",
    RIGHT = "right"
}
/**
 * Object wrapping the focusable HTML elements of dropdown menu with the neighbors in 4 directions of each menu item.
 */
export interface MenuItem {
    /**
     * The HTML element of this dropdown menu item
     */
    element: HTMLElement;
    /**
     * Neighboring menu items in all the 4 directions
     */
    up?: MenuItem;
    down?: MenuItem;
    left?: MenuItem;
    right?: MenuItem;
    /**
     * Call back to close the menu for which this menu item can be a trigger. called from {@link DropdownFocusHandlerService}
     */
    closeMenu?: () => void;
}
/**
 * Added on to vcd-dropdown component to link menu items of the dropdown on which this directive is added. each item is linked to its
 * neighbors in the 4 directions. It then uses the {@link DropdownFocusHandlerService} to move the DOM focus between the menu items.
 */
export declare class DropdownFocusHandlerDirective implements AfterViewInit, OnDestroy {
    private parentVcdDropdown;
    private parentFocusHandler;
    private hostVcdDropdown;
    private focusHandlerService;
    private renderer;
    constructor(parentVcdDropdown: DropdownComponent, parentFocusHandler: DropdownFocusHandlerDirective, hostVcdDropdown: DropdownComponent, focusHandlerService: DropdownFocusHandlerService, renderer: Renderer2);
    /**
     * List of focusable menu items with their neighbors in 4 directions.
     */
    menuItems: MenuItem[];
    /**
     * The menu item which can toggle this menu. This can be the root dropdown trigger or nested menu trigger
     */
    private menuTrigger;
    private dropdownTriggerEl;
    private clrDropdownMenuEl;
    private isRootDropdown;
    private timeoutId;
    private subscriptionTracker;
    private unlistenRightArrowKeyPress;
    /**
     * After a dropdown menu is opened, it creates {@link MenuItem} for each of the menu items along with their trigger menu item and links
     * them. It also then moves the focus to first item in the opened menu list.
     */
    ngAfterViewInit(): void;
    /**
     * Sometimes when the right arrow key is pressed on a nested menu trigger, the event is propagating to sibling nested menu triggers and
     * the event handlers attached to the menu triggers by clarity to toggle the menus are being invoked. Because of this, pressing right
     * arrow on a nested menu is opening other sibling menus as well
     */
    private listenToRightArrowKeyPressOnNestedTrigger;
    private reset;
    ngOnDestroy(): void;
    private registerRootMenuContainer;
    private moveFocusToFirstItem;
    private getDropdownItemElement;
    private linkMenuItems;
    private closeVcdDropdown;
    private get rootMenuTrigger();
    private get nestedMenuTrigger();
    private linkVertical;
}
