import { TemplateRef, EventEmitter, AfterContentInit, Renderer2, ElementRef, OnDestroy } from '@angular/core';
import { NavItem } from '../navigation/nav-item';
import { WindowService } from '../../core/window.service';
import { ScrollService } from '../../core/scroll.service';
export declare type MenuTemplateType = "label" | "iconAndLabel" | "checkAndLabel";
export declare type MenuHostElementClasses = 'bg-transparent';
export interface MenuItem<TValue = any, SItems = any> extends NavItem {
    label: string;
    items?: MenuItem<SItems>[];
    checked?: boolean;
    display?: 'default' | 'heading' | 'divider';
    value?: TValue;
    classList?: string;
    disabled?: boolean;
    hidden?: boolean;
    readonly?: boolean;
    target?: '_self' | '_blank' | '_parent' | '_top';
    externalLink?: boolean;
}
export declare const menuAnimationSpeed = 350;
/**
 * Primitive Menu component that encapsulates known templates
 *
 * @export
 */
export declare class MenuComponent implements AfterContentInit, OnDestroy {
    private el;
    private renderer;
    private windowService;
    private scrollService;
    /**
     * Input for the menu's template id
     */
    id?: string;
    /**
     * Id bound to the host element
     */
    attrId?: string;
    /**
     * Array of items to display
     *
     * @memberof MenuComponent
     */
    items: Array<MenuItem>;
    /**
     *  Selected item; annotates the item
     *  when displayed with 'selected' class
     *
     * @memberof MenuComponent
     */
    selected: MenuItem | null;
    /**
     * The parent menu item. If defined, a header with the parent's label and a
     * back button will be displayed.
     */
    parent?: MenuItem;
    /**
     * Display template
     *
     * @memberof MenuComponent
     */
    templateType: MenuTemplateType;
    /**
     * The menu's title
     */
    title?: string;
    /**
     * Show message when there are no items
     */
    showNoItems?: boolean;
    /**
     * Text to show when menu is empty and showNoItems is true
     */
    noDataText: string;
    /**
     * Controls whether keyboard navigation is enabled
     */
    enableKeyNav?: boolean;
    /**
     * Item currently highlighted by keyboard navigation
     */
    highlightedItem: MenuItem | null;
    /**
     * Emitted when `selected` is changed. Emits the referenced object.
     *
     * @memberof MenuComponent
     */
    selectedChanged: EventEmitter<MenuItem>;
    /**
     * Emitted when the menu has a parent and back is clicked
     * @memberof MenuComponent
     */
    menuClosed: EventEmitter<void>;
    /**
     * The item template that is loaded into the component template
     *
     * @memberof MenuComponent
     */
    internalizedTemplate: TemplateRef<any>;
    /**
     * Index of the item currently highlighted using keyboard nav
     */
    highlightedItemIndex: number;
    /**
     * A reference to the menu label template
     */
    private labelTemplate;
    /**
     * A reference to the menu icon and label template
     */
    private iconAndLabelTemplate;
    /**
     * A reference to the menu check and label template
     */
    private checkAndLabelTemplate;
    /**
     * Contains the function used to remove the even listener from the renderer
     */
    private removeKeydownListener?;
    /**
     * Last item this.selected was set to via selectItem().
     * This isn't necessarily the same as this.selected, because this.selected is an input property
     * and could have been changed by a consumer through some means other than selectItem().
     * This allows us to prevent double-calls to selectItem() with the same input.
     */
    private lastSelected;
    constructor(el: ElementRef, renderer: Renderer2, windowService: WindowService, scrollService: ScrollService);
    /**
     * Sets & displays the interalized template based on
     * the set template.
     * @see { @link https://angular.io/guide/lifecycle-hooks|Angular Lifecycle Hooks}
     *
     * @memberof MenuComponent
     */
    ngAfterContentInit(): void;
    ngOnDestroy(): void;
    /**
     * When a menu item is selected, open a child menu if the item has items, call
     * the item's click method if defined, or emit the selected item.
     *
     * @param item The selected item
     * @memberof MenuComponent
     */
    selectItem(event: Event, item: MenuItem, isKeyEvent?: boolean): void;
    /**
     * Close the current menu and open the parent menu
     * @memberof MenuComponent
     */
    back(event: Event): void;
    /**
     * Emit the selected item
     * @param item The selected item
     */
    onSelection(item: MenuItem): void;
    /**
     * Open or close the child menu. When the child menu closes, the selected
     * item is reset.
     * @memberof MenuComponent
     */
    toggleChildMenu(open: boolean): void;
    /**
     * Handle key presses to navigate the menu
     */
    keyNavigate(event: KeyboardEvent): void;
    /**
     * Scroll to the item currently marked as 'is-selected'. Wait a tick for the
     * NgClassDirecitve or NavItemActiveDirective to respond to the model changes
     * and update the view.
     */
    scrollToSelectedItem(): void;
    private moveHighlightedUpOrDown;
    /**
     * Scroll to the specified menu item.
   * If no item is provided, it will scroll to the first item.
     *
   * @param item The menu item to scroll to.
     * @memberof MenuComponent
     */
    private scrollMenu;
    private scrollToHighlightedItem;
    /**
     * Find a given item's index in the filtered items array.
     *
     * Returns -1 if not found
     * @param itemToFind The matching item to find in the items array.
     * @memberof MenuComponent
     */
    private findItemIndex;
    private addKeydownListener;
    /**
     * Sets the menu item ids using its index if item doesn't already have one
     */
    private setItemIds;
}
