/// <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?: HTMLElement;
    submenuTarget?: HTMLElement;
    positions?: any;
    slideDirectionalClassName?: string;
    subMenuId?: string;
    submenuDirection?: DirectionalHint;
}
export declare function hasSubmenuItems(item: IContextualMenuItem): boolean;
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 _scrollIdleDelay;
    private _scrollIdleTimeoutId;
    constructor(props: IContextualMenuProps);
    dismiss(ev?: any, dismissAll?: boolean): void;
    componentWillUpdate(newProps: IContextualMenuProps): void;
    componentWillMount(): void;
    componentDidMount(): void;
    componentWillUnmount(): void;
    render(): JSX.Element | null;
    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 _renderSplitIconButton(item, classNames, index);
    private _renderSplitDivider(item);
    private _renderMenuItemChildren(item, classNames, index, hasCheckmarks, hasIcons);
    private _getIconProps(item);
    private _renderIcon(item, classNames);
    private _onKeyDown(ev);
    private _onMenuKeyDown(ev);
    /**
     * 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(item, ev);
    private _onItemMouseDown(item, ev);
    private _onItemClick(item, ev);
    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(ev?, dismissAll?);
    private _setTargetWindowAndElement(target);
}
