import React from 'react';
import { StandardProps } from '../../util/component-types';
interface IContextMenuTargetProps extends StandardProps {
    elementType: string;
}
interface IContextMenuFlyOutProps extends React.HTMLAttributes<HTMLDivElement> {
}
/** These have to be lowercase because:
 * 1. the key and value have to match
 * 	(limitation of TypeScript, see: https://github.com/Microsoft/TypeScript/issues/17198)
 * 2. the values are currently lowercase in the propTypes
 * */
export declare enum EnumDirection {
    up = "up",
    down = "down",
    left = "left",
    right = "right"
}
export declare type Direction = keyof typeof EnumDirection;
export declare enum EnumAlignment {
    start = "start",
    center = "center",
    end = "end"
}
export declare type Alignment = keyof typeof EnumAlignment;
export interface FlyoutPosition {
    opacity: number;
    maxHeight: string | number;
    left: string | number;
    top: string | number;
}
declare type GetAlignmentOffset = (n: number) => number;
interface IContextMenuProps extends StandardProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
    /** direction of the FlyOut relative to Target. */
    direction?: Direction;
    /**	the px offset along the axis of the direction */
    directonOffset: number;
    /** alignment of the Flyout relative to Target in the cross axis from `direction`. */
    alignment: Alignment;
    /** the px offset along the axis of the alignment */
    alignmentOffset?: number;
    /** an alternative to `alignmentOffset` a function that is applied with
        the width/height of the flyout. the result is used as the
        `alignmentOffset` */
    getAlignmentOffset: GetAlignmentOffset;
    /** The number of px's to grow or shrink the minWidth of the FlyOut */
    minWidthOffset: number;
    /** Indicates whether the FlyOut will render or not. */
    isExpanded: boolean;
    /** Called when a click event happenens outside of the ContextMenu */
    onClickOut: ({ event, props, }: {
        event: MouseEvent;
        props: IContextMenuProps;
    }) => void | null;
    /** The `id` of the FlyOut portal element that is appended to
        `document.body`. Defaults to a generated `id`. */
    portalId: string | null;
    FlyOut?: React.ReactNode;
    Target?: React.ReactNode;
}
interface IContextMenuState {
    portalId: string;
    targetRect: {
        bottom: number;
        top: number;
        left: number;
        right: number;
        height: number;
        width: number;
    };
    flyOutHeight: number;
    flyOutWidth: number;
}
declare class ContextMenu extends React.Component<IContextMenuProps, IContextMenuState, {}> {
    static displayName: string;
    static peek: {
        description: string;
        categories: string[];
        madeFrom: string[];
    };
    static propTypes: {
        children: any;
        className: any;
        style: any;
        direction: any;
        directonOffset: any;
        alignment: any;
        alignmentOffset: any;
        getAlignmentOffset: any;
        minWidthOffset: any;
        isExpanded: any;
        onClickOut: any;
        portalId: any;
        FlyOut: any;
        Target: any;
    };
    static UP: EnumDirection;
    static DOWN: EnumDirection;
    static LEFT: EnumDirection;
    static RIGHT: EnumDirection;
    static START: EnumAlignment;
    static CENTER: EnumAlignment;
    static END: EnumAlignment;
    static Target: {
        (_props: IContextMenuTargetProps): null;
        displayName: string;
        propName: string;
        peek: {
            description: string;
        };
        propTypes: {
            elementType: any;
        };
        defaultProps: {
            elementType: string;
        };
    };
    static FlyOut: {
        (_props: IContextMenuFlyOutProps): null;
        displayName: string;
        propName: string;
        peek: {
            description: string;
        };
    };
    private targetRef;
    private flyOutPortalRef;
    static defaultProps: {
        direction: string;
        directonOffset: number;
        minWidthOffset: number;
        alignment: string;
        getAlignmentOffset: () => number;
        isExpanded: boolean;
        onClickOut: null;
        portalId: null;
    };
    state: {
        portalId: string;
        targetRect: {
            bottom: number;
            top: number;
            left: number;
            right: number;
            height: number;
            width: number;
        };
        flyOutHeight: number;
        flyOutWidth: number;
    };
    continueAlignment: boolean;
    beginAlignment: () => void;
    endAlignment: () => void;
    handleAlignment: () => void;
    handleBodyClick: (event: MouseEvent | TouchEvent) => void;
    calcAlignmentOffset: ({ direction, alignment, getAlignmentOffset, flyOutHeight, flyOutWidth, }: {
        direction: Direction;
        alignment: Alignment;
        getAlignmentOffset: GetAlignmentOffset;
        flyOutHeight: number;
        flyOutWidth: number;
    }) => number;
    getMatch: ({ direction, alignment, flyOutHeight, flyOutWidth, clientWidth, directonOffset, alignmentOffset, top, bottom, left, right, width, height, }: {
        direction: Direction;
        alignment: Alignment;
        flyOutHeight: number;
        flyOutWidth: number;
        clientWidth: number;
        directonOffset: number;
        alignmentOffset: number;
        top: number;
        bottom: number;
        left: number;
        right: number;
        width: number;
        height: number;
    }) => FlyoutPosition;
    getFlyoutPosition: () => FlyoutPosition | {} | undefined;
    alignFlyOut: (doRedunancyCheck?: boolean) => void;
    UNSAFE_componentWillReceiveProps(): void;
    componentDidMount(): void;
    componentWillUnmount(): void;
    render(): React.ReactNode;
}
export default ContextMenu;
