/// <reference types="react" />
import { IContextualMenuProps, IContextualMenuItem } from './ContextualMenu.types';
import { DirectionalHint } from '../../common/DirectionalHint';
import { BaseComponent } from '../../Utilities';
export interface IContextualMenuState {
    expandedMenuItemKey?: string;
    dismissedMenuItemKey?: string;
    contextualMenuItems?: IContextualMenuItem[];
    contextualMenuTarget?: Element;
    submenuTarget?: Element;
    positions?: any;
    slideDirectionalClassName?: string;
    subMenuId?: string;
    submenuDirection?: DirectionalHint;
}
export declare function getSubmenuItems(item: IContextualMenuItem): IContextualMenuItem[] | undefined;
/**
 * Returns true if a list of menu items can contain a checkbox
 */
export declare function canAnyMenuItemsCheck(items: IContextualMenuItem[]): boolean;
export declare class ContextualMenu extends BaseComponent<IContextualMenuProps, IContextualMenuState> {
    static defaultProps: IContextualMenuProps;
    private _host;
    private _previousActiveElement;
    private _isFocusingPreviousElement;
    private _enterTimerId;
    private _targetWindow;
    private _target;
    private _classNames;
    private _isScrollIdle;
    private readonly _navigationIdleDelay;
    private _scrollIdleTimeoutId;
    private _splitButtonContainers;
    private _adjustedFocusZoneProps;
    constructor(props: IContextualMenuProps);
    dismiss: (ev?: any, dismissAll?: boolean | undefined) => void;
    componentWillUpdate(newProps: IContextualMenuProps): void;
    componentWillMount(): void;
    componentDidMount(): void;
    componentWillUnmount(): void;
    render(): JSX.Element | null;
    /**
     * Gets the focusZoneDirection by using the arrowDirection if specified,
     * the direction specificed in the focusZoneProps, or defaults to FocusZoneDirection.vertical
     */
    private _getFocusZoneDirection();
    private _onRenderSubMenu(subMenuProps);
    private _renderMenuItem(item, index, focusableElementIndex, totalItemCount, hasCheckmarks, hasIcons);
    private _renderSectionItem(item, menuClassNames, index, hasCheckmarks, hasIcons);
    private _renderListItem(content, key, classNames, title?);
    private _renderSeparator(index, classNames, top?, fromSection?);
    private _renderNormalItem(item, classNames, index, focusableElementIndex, totalItemCount, hasCheckmarks, hasIcons);
    private _renderHeaderMenuItem(item, classNames, index, hasCheckmarks, hasIcons);
    private _renderAnchorMenuItem(item, classNames, index, focusableElementIndex, totalItemCount, hasCheckmarks, hasIcons);
    private _renderButtonItem(item, classNames, index, focusableElementIndex, totalItemCount, hasCheckmarks?, hasIcons?);
    private _renderSplitButton(item, classNames, index, focusableElementIndex, totalItemCount, hasCheckmarks?, hasIcons?);
    private _renderSplitPrimaryButton(item, classNames, index, hasCheckmarks, hasIcons);
    private _onSplitContainerItemKeyDown(item, ev);
    private _renderSplitIconButton(item, classNames, index);
    private _renderSplitDivider(item);
    private _getIconProps(item);
    private _onKeyDown;
    /**
     * Checks if the submenu should be closed
     */
    private _shouldCloseSubMenu;
    private _onMenuKeyDown;
    /**
     * Scroll handler for the callout to make sure the mouse events
     * for updating focus are not interacting during scroll
     */
    private _onScroll;
    private _onItemMouseEnter(item, ev);
    private _onItemMouseMove(item, ev);
    private _onMouseItemLeave;
    /**
     * Handles updating focus when mouseEnter or mouseMove fire.
     * As part of updating focus, This function will also update
     * the expand/collapse state accordingly.
     */
    private _updateFocusOnMouseEvent(item, ev);
    private _onItemMouseDown(item, ev);
    private _onItemClick(item, ev);
    private _onSplitItemClick(item, ev);
    private _onItemClickBase(item, ev, target);
    private _onAnchorClick(item, ev);
    private _executeItemClick(item, ev);
    private _onItemKeyDown(item, ev);
    private _onItemSubMenuExpand(item, target);
    private _getSubmenuProps();
    private _findItemByKey(key);
    /**
     * Returns the item that mathes a given key if any.
     * @param key The key of the item to match
     * @param items The items to look for the key
     */
    private _findItemByKeyFromItems(key, items);
    private _onSubMenuDismiss;
    private _setTargetWindowAndElement(target);
    private _isItemDisabled(item);
    private _getSubMenuId(item);
}
