import * as PropTypes from "prop-types";
import * as React from "react";
import MenuItem, { Props as MenuItemProps } from "./MenuItem";
import { ChildrenOf, Values } from "../utils/types";
import "./Menu.less";
export interface Props {
    children?: ChildrenOf<typeof MenuItem>;
    className?: string;
    maxHeight?: string | number;
    maxWidth?: string | number;
    minWidth?: string | number;
    onOpenChange?: (isOpen: boolean) => void;
    onSelect?: Function;
    placement?: Values<typeof Placement>;
    stayOpenOnSelect?: boolean;
    trigger: React.ReactElement;
    wrapItems?: boolean;
    [additionalProp: string]: any;
}
declare const Placement: {
    readonly LEFT: "left";
    readonly RIGHT: "right";
};
/**
 * Attaches a dropdown menu to the given child node.
 *
 * Follows recommendations from w3.org:
 * https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/menu-button/menu-button-links.html
 */
export default class Menu extends React.PureComponent<Props> {
    static propTypes: {
        children: PropTypes.Requireable<any>;
        className: PropTypes.Requireable<string>;
        maxHeight: PropTypes.Requireable<string>;
        maxWidth: PropTypes.Requireable<string>;
        minWidth: PropTypes.Requireable<string>;
        onOpenChange: PropTypes.Requireable<(...args: any[]) => any>;
        onSelect: PropTypes.Requireable<(...args: any[]) => any>;
        placement: PropTypes.Requireable<"left" | "right">;
        stayOpenOnSelect: PropTypes.Requireable<boolean>;
        trigger: PropTypes.Validator<PropTypes.ReactNodeLike>;
        wrapItems: PropTypes.Requireable<boolean>;
    };
    static defaultProps: {
        maxHeight: string;
        maxWidth: string;
        minWidth: string;
        onOpenChange: (...args: any[]) => void;
        onSelect: (...args: any[]) => void;
        placement: "left";
    };
    static Item: typeof MenuItem;
    static Placement: {
        readonly LEFT: "left";
        readonly RIGHT: "right";
    };
    _menuID: number;
    IDs: {
        DROPDOWN: string;
        TRIGGER: string;
    };
    _containerEl: any;
    _triggerRef: any;
    state: {
        focusIndex: number;
        open: boolean;
    };
    render(): JSX.Element;
    _handleTriggerRef: (ref: any) => void;
    _handleTriggerClick: (e: any) => void;
    _handleItemClick: (menuItem: any, e: any) => void;
    _handleItemMouseEnter: (menuItem: any, i: any, e: any) => void;
    _handleFocusOut: (e: any) => void;
    _handleKeyDown: (e: any) => void;
    _handleArrowKeyDown: (e: any) => void;
    _handleKeyUp: (e: any) => void;
    _getKeyCode(e: any): any;
    _refocusTrigger: () => any;
    _toggleDropdown: () => void;
    _setDropdownOpen: (open: any, cb?: (...args: any[]) => void) => void;
    _getMenuItems(): React.ReactElement<MenuItemProps, string | ((props: any) => React.ReactElement<any, any>) | (new (props: any) => React.Component<any, any, any>)>[];
    _isFocused(menuItem: any, itemIndex: any): boolean;
}
export {};
