/*!
 * Copyright 2020 VMware, Inc.
 * SPDX-License-Identifier: BSD-2-Clause
 */
import { QueryList, TrackByFunction } from '@angular/core';
import { ClrDropdown } from '@clr/angular';
import { TextIcon } from '../common/interfaces';
import { CliptextConfig } from '../lib/directives';
export declare const NESTED_MENU_HIDE_DELAY = 400;
/**
 * Object representing an item of the dropdown
 */
export interface DropdownItem<T extends DropdownItem<T>> {
    /**
     * The i18n key or a translated string for contents of a action button
     */
    textKey?: string;
    /**
     * List of items that will be grouped under this item
     */
    children?: T[];
    /**
     * The Clarity icon of the contextual button that is displayed if the button is featured.
     */
    icon?: string;
    /**
     * To mark if the {@link #ActionItem.textKey} has to be translated or not
     */
    isTranslatable?: boolean;
    /**
     * CSS class of the dropdown item. Must be unique among all dropdown items within the dropdown items list
     */
    class?: string;
    /**
     * To add separators between groups of dropdown items
     */
    isSeparator?: boolean;
    /**
     * This is the busy state for the menu item. Used by extension actions of plugins
     */
    busy?: boolean;
}
/**
 * Dumb component used for displaying nested drop downs
 */
export declare class DropdownComponent<T extends DropdownItem<T>> {
    private parentVcdDropdown;
    /**
     * Decides what goes into the action buttons
     * @param textIcon An enum that describes the possible ways to display the button title
     */
    set dropdownItemContents(textIcon: TextIcon);
    get dropdownItemContents(): TextIcon;
    /**
     * Nested list of dropdown objects
     */
    set items(items: T[]);
    get items(): T[];
    constructor(parentVcdDropdown: DropdownComponent<T>);
    /**
     * If a icon should be displayed inside contextual buttons
     */
    shouldShowIcon: boolean;
    /**
     * If a text should be displayed inside contextual buttons
     */
    shouldShowText: boolean;
    /**
     * If the contextual buttons with icons should have a tooltip
     */
    shouldShowTooltip: boolean;
    /**
     * Default configuration for vcdShowClippedText directive
     */
    clipTextConfig: CliptextConfig;
    /**
     * Text Content of the button that opens the root dropdown when clicked
     */
    dropdownTriggerBtnTxt: string;
    /**
     * Icon shown in the button that opens the root dropdown when clicked
     */
    dropdownTriggerBtnIcon: string;
    /**
     * The {@link ngForTrackBy} method used for rendering of a dropdown actions or for rendering nested drop downs
     * NOTE: Without this, nested drop downs don't get rendered on the screen
     */
    trackByFunction: TrackByFunction<T>;
    /**
     * The position the root dropdown with respect to root dropdown trigger button. Refer to {@link clrPosition} for it's values
     */
    dropdownPosition: string;
    /**
     * The position of all the nested dropdowns {@link clrPosition}. Default is 'bottom-left'
     */
    nestedDropdownPosition: string;
    /**
     * Dropdown item click handler
     */
    onItemClickedCb: (item: T) => void;
    /**
     * Method to calculate disabled state of an item
     */
    isItemDisabledCb: (item: T) => boolean;
    /**
     * Used for displaying different button contents in the root dropdown trigger button vs nested dropdown trigger button
     */
    isNestedDropdown: boolean;
    isDropdownDisabled: boolean;
    private _dropdownItemContents;
    private _items;
    /**
     * Css class name added to the dropdown trigger buttons
     */
    dropdownTriggerButtonClassName: string;
    /**
     * To toggle open an close states when hovered over
     */
    clrDropdown: ClrDropdown;
    /**
     * List of nested dropdown children that belong to this dropdown. Used to close when a different child in this menu list is
     * hovered over
     */
    vcdDropdownChildren: QueryList<DropdownComponent<T>>;
    private hideTimeout;
    private flattenNestedItemsWithSingleChild;
    private flattenItemsWithSingleChild;
    /**
     * To check in the HTML, if a dropdown item of separator type should be used to add a separator item in the dropdown
     * This is required because,
     * 1. As each item decides its own availability, some groups may become empty and we collapse separators before them
     * 2. A separator is not required if it is the first item in the dropdown list
     * @param index Position of the dropdown item in the dropdown list
     * @param currentItem The current item in the list that is being iterated over
     */
    shouldRenderAsSeparator(index: number, currentItem: DropdownItem<T>): boolean;
    /**
     * Handles the mouseover events on this dropdown's children that are of {@link #DROPDOWN_ITEM_SELECTOR} and
     * {@link #NESTED_DROPDOWN_TRIGGER_SELECTOR} type. When mouse is hovered on a child of type...
     * - DROPDOWN_ITEM_SELECTOR: Any open children of dropdown type have to be closed. This is because, user will always not mouse out of
     * a nested dropdown host(<vcd-dropdown>) to trigger the close event. He can move the mouse from nested dropdown's item to this
     * dropdown's item directly
     * - NESTED_DROPDOWN_TRIGGER_SELECTOR: Any open children of parent dropdown have to be closed and this dropdown has to be opened. We ask
     * the parent to close its children because, the mouse over events are not propagated upwards when hovered over a child of nested
     * dropdown type
     */
    onMouseOver(event: Event): void;
    /**
     * Handles the mouseout events on this dropdown's children that are of {@link #NESTED_DROPDOWN_TRIGGER_SELECTOR} type
     */
    onMouseOut(event: Event): void;
    private closeOpenVcdDropdownChildren;
}
