import React, { Component, CSSProperties, Key, MouseEventHandler, ReactElement, ReactNode } from 'react';
import { ElementProps } from '../../pro/es/core/ViewComponent';
import TaskRunner from '../_util/TaskRunner';
import Popup from './Popup';
import EventManager from '../_util/EventManager';
import { Action, HideAction, ShowAction } from './enum';
import { Config, ConfigKeys, DefaultConfig } from '../configure';
export declare type RenderFunction = (props?: {
    trigger?: ReactNode;
}) => React.ReactNode;
export declare type ChildrenFunction = (caller: (node: ReactNode) => ReactNode, childrenProps?: any) => ReactElement;
export interface TriggerProps extends ElementProps {
    action?: Action[];
    showAction?: ShowAction[];
    hideAction?: HideAction[];
    popupContent?: ReactNode | RenderFunction;
    popupCls?: string;
    popupStyle?: CSSProperties;
    popupInnerStyle?: CSSProperties;
    popupHidden?: boolean;
    popupPlacement?: string;
    popupAlign?: object;
    builtinPlacements?: any;
    onPopupAlign?: (source: Node, align: object, target: Node | Window, translate: {
        x: number;
        y: number;
    }) => void;
    onPopupAnimateAppear?: (key: Key | null) => void;
    onPopupAnimateEnter?: (key: Key | null) => void;
    onPopupAnimateLeave?: (key: Key | null) => void;
    onPopupAnimateEnd?: (key: Key | null, exists: boolean) => void;
    onPopupHiddenBeforeChange?: (hidden: boolean) => boolean;
    onPopupHiddenChange?: (hidden: boolean) => void;
    onPopupMouseEnter?: MouseEventHandler<any>;
    onPopupMouseLeave?: MouseEventHandler<any>;
    getRootDomNode?: () => Element | null | Text;
    getPopupStyleFromAlign?: (target: Node | Window, align: object) => object | undefined;
    getPopupClassNameFromAlign?: (align: object) => string | undefined;
    getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement | undefined | null;
    focusDelay?: number;
    blurDelay?: number;
    mouseEnterDelay?: number;
    mouseLeaveDelay?: number;
    transitionName?: string;
    defaultPopupHidden?: boolean;
    forceRender?: boolean;
    tabIntoPopupContent?: boolean;
    popupClassName?: string;
    children?: ReactNode | ChildrenFunction;
    childrenProps?: any;
    getContextConfig?<T extends ConfigKeys>(key: T): T extends keyof DefaultConfig ? DefaultConfig[T] : Config[T];
}
export default class Trigger extends Component<TriggerProps> {
    static displayName: string;
    static defaultProps: {
        focusDelay: number;
        blurDelay: number;
        mouseEnterDelay: number;
        mouseLeaveDelay: number;
        transitionName: string;
        defaultPopupHidden: boolean;
    };
    popup: Popup | null;
    popupTask?: TaskRunner;
    documentEvent?: EventManager;
    focusTime: number;
    preClickTime: number;
    animateFrameId: number;
    popupHidden?: boolean;
    mounted?: boolean;
    activeElement?: HTMLElement | null;
    relatedTarget?: HTMLButtonElement | null;
    activeElementEvent?: EventManager;
    mouseDownEvent?: EventManager;
    currentTriggerChild?: ReactElement | null;
    focusElements?: HTMLElement[];
    target?: HTMLElement | null;
    focusTarget?: HTMLElement | null;
    align?: object;
    constructor(props: any, context: any);
    saveRef(node: any): void;
    setActiveElement(activeElement: HTMLElement | null): void;
    getFocusableElements(elements: any): void;
    renderTriggerChild(child: ReactNode): ReactNode;
    render(): ({} | null | undefined)[];
    componentWillReceiveProps(nextProps: any): void;
    componentDidMount(): void;
    componentDidUpdate(): void;
    componentWillUnmount(): void;
    cancelPopupTask(): void;
    handlePopupKeyDown(e: any): void;
    handleTargetBlur(e: any, child: ReactElement): boolean;
    handleTriggerEvent(eventName: any, child: any, e: any): void;
    handleEvent(eventName: string, child: ReactElement, e: any): void;
    handlePopupMouseDown(e: any): void;
    handlePopupBlur(e: any): void;
    handleContextMenu(e: any): void;
    handleKeyDown(e: any): void;
    handleFocus(): void;
    handleBlur(): void;
    handleDocumentMouseDown(e: any): void;
    handleDocumentScroll({ target }: {
        target: any;
    }): void;
    handleMouseDown(): void;
    handleClick(e: any): void;
    handleMouseEnter(): void;
    handleMouseLeave(): void;
    handlePopupMouseEnter(e: any): void;
    handlePopupMouseLeave(e: any): void;
    getPopup(): ReactNode;
    getRootDomNode(): Element | Text | null;
    getPopupClassNameFromAlign(align: any): string;
    forcePopupAlign(): void;
    getPopupWrapper(): HTMLDivElement | undefined;
    getPopupContent(): any;
    popupHiddenBeforeChange(hidden: boolean): boolean;
    setPopupHidden(hidden: boolean): void;
    delaySetPopupHidden(popupHidden: any, delay: any): void;
    isClickToShow(): boolean;
    isContextMenuToShow(): boolean;
    isClickToHide(): boolean;
    isMouseEnterToShow(): boolean;
    isMouseLeaveToHide(): boolean;
    isFocusToShow(): boolean;
    isBlurToHide(): boolean;
}
