import { Component } from 'react';
import * as Position from './placement';
import PopoverContent from './Content';
import { IPopoverContentImperativeHandle, IPopoverContext } from './Context';
import { IPositionFunction } from './position-function';
import { IPortalImperativeHandlers } from '../portal';
import Anchor from './Anchor';
export interface IPopoverBeforeHook {
    (continuation?: () => void, escape?: () => void): Promise<void> | void;
}
export interface IPopoverProps {
    position: IPositionFunction;
    cushion?: number;
    onShow?: () => void;
    onClose?: () => void;
    onBeforeShow?: IPopoverBeforeHook;
    onBeforeClose?: IPopoverBeforeHook;
    containerSelector?: string;
    visible?: boolean;
    onVisibleChange?: (visible: boolean) => void;
    onPositionUpdated?: () => void;
    onPositionReady?: () => void;
    className?: string;
    style?: React.CSSProperties;
}
export interface IPopoverState {
    visible: boolean;
}
export declare class Popover extends Component<IPopoverProps, IPopoverState> {
    static contextType: import("react").Context<IPopoverContext>;
    context: IPopoverContext | null;
    static defaultProps: {
        cushion: number;
        containerSelector: string;
    };
    static Anchor: typeof Anchor;
    static Content: typeof PopoverContent;
    static Trigger: {
        Click: typeof import("./trigger").PopoverClickTrigger;
        Hover: typeof import("./trigger").PopoverHoverTrigger;
        Focus: typeof import("./trigger").PopoverFocusTrigger;
        Base: typeof import("./trigger").PopoverTrigger;
    };
    static Position: typeof Position;
    static withPopover: <T extends {
        popover: Popover;
    }>(Comp: import("react").ComponentType<T>) => import("react").ComponentType<Omit<T, "popover">>;
    static Context: import("react").Context<IPopoverContext>;
    getAnchor: (() => Element | Text | null) | null;
    private isUnmounted;
    private pendingOnBeforeHook;
    private didMountHooks;
    private didMountCleanup;
    readonly portalRef: import("react").RefObject<IPortalImperativeHandlers>;
    isPositionReady: boolean;
    readonly contentRef: import("react").RefObject<IPopoverContentImperativeHandle>;
    state: {
        visible: boolean;
    };
    private escape;
    private didMount;
    setVisible(visible: boolean): void | Promise<void>;
    adjustPosition(): void;
    open: () => void;
    close: () => void;
    positionUpdated(): void;
    safeSetState(nextState: IPopoverState, callback?: () => void): void;
    static getDerivedStateFromProps(props: IPopoverProps): Partial<IPopoverState> | null;
    componentDidMount(): void;
    componentDidUpdate(prevProps: IPopoverProps, prevState: IPopoverState): void;
    componentWillUnmount(): void;
    render(): JSX.Element;
}
export default Popover;
