import { ContentRect } from 'react-measure';
import { PopperState } from '../Popper';
import { Placement } from 'popper.js';
import { Component, KeyboardEventHandler, MouseEvent, MutableRefObject, ReactElement, ReactNode } from 'react';
import './Popover.less';
declare const PLACEMENT_MAP: Record<string, Placement>;
export interface PopoverProps {
    /**
     * The reference element used to position the popover.
     * @since 0.0.65
     */
    target: ReactElement;
    /**
     * A React reference to the DOM element that needs for calculating the position of the popup.
     * It is required only when visible or defaultVisible props are provided.
     * @since 3.12.0
     */
    targetRef?: MutableRefObject<HTMLElement | null>;
    /**
     * Popover visibility. For controlled component only.
     * @since 0.0.65
     */
    visible?: boolean;
    /**
     * Popover default (on init) visibility. For uncontrolled component only.
     * @since 0.0.66
     */
    defaultVisible?: boolean;
    /**
     * Popover title. Header will only be rendered if this prop is defined.
     * @since 0.0.42
     */
    title?: ReactNode;
    /**
     * Click handler for close button. If it is not defined then default behavior (hide popover) will be used.
     * @since 0.0.42
     */
    onClose: () => void;
    /**
     * Popover placement
     * @since 0.0.42
     */
    placement?: keyof typeof PLACEMENT_MAP;
    /**
     * Indicating if clicking outside the popover should close it.
     * @since 0.0.65
     */
    canCloseOnOutsideClick?: boolean;
    /**
     * Indicating if pressing the escape key should close the popover.
     * @since 0.0.65
     */
    canCloseOnEscapePress?: boolean;
    /**
     * Content of the Popover
     * @since 0.0.42
     */
    children?: ReactNode;
    /**
     * Visual intent color to apply to component.
     * @since 0.0.59
     */
    intent?: 'info' | 'success' | 'warning' | 'danger';
    /**
     * Undo predefined max-width.
     * @since 2.4.0
     */
    wide?: boolean;
    /**
     * Define the popover width.
     * @since 3.2.0
     */
    width?: 'xs' | 'sm' | 'md' | 'lg';
    /**
     * Define the popover height.
     * @since 3.3.0
     */
    height?: number | string;
    /**
     * A slot for buttons or links in the header.
     * @since 3.16.0
     */
    extra?: ReactNode;
    /**
     * @ignore
     */
    className?: string;
    /**
     * @ignore
     */
    baseClassName?: string;
    /**
     * Boundaries element for preventOverflow property.
     * @since 1.12.4
     */
    boundariesElement?: 'scrollParent' | 'window' | 'viewport';
    /**
     * @ignore
     */
    autoFocus?: boolean;
}
declare type PopoverState = {
    show?: boolean;
    arrowInHeader: boolean;
};
/**
 * `Popover` component is non-modal pop-up window used for providing additional information
 * for an interface element. It also may contain Form with few fields or any other small content.
 * @since 0.0.42
 */
declare class Popover extends Component<PopoverProps, PopoverState> {
    static contextType: import("react").Context<boolean>;
    static defaultProps: {
        visible: null;
        defaultVisible: boolean;
        title: undefined;
        onClose: undefined;
        placement: string;
        canCloseOnOutsideClick: boolean;
        canCloseOnEscapePress: boolean;
        children: undefined;
        intent: undefined;
        wide: undefined;
        width: undefined;
        height: undefined;
        extra: undefined;
        className: undefined;
        baseClassName: string;
        boundariesElement: undefined;
        autoFocus: boolean;
        targetRef: undefined;
    };
    state: {
        show: boolean | undefined;
        arrowInHeader: boolean;
    };
    static getDerivedStateFromProps(props: PopoverProps, state: PopoverState): {
        show: boolean | undefined;
    };
    componentDidUpdate(_: PopoverProps, prevState: PopoverState): void;
    private contentRef;
    private targetRef;
    private prevFocusElement;
    private popperData;
    private headerBounds;
    focus(): void;
    checkArrowPosition: () => void;
    hotkeyHandler: KeyboardEventHandler<HTMLDivElement>;
    handleTargetClick: (e: MouseEvent<HTMLDivElement>) => void;
    handleClose: () => void;
    handleHeaderResize: (contentRect: ContentRect) => void;
    handlePopperUpdate: (popperData: PopperState) => void;
    getIgnoreNodes: () => (Element | Text | null)[] | (MutableRefObject<HTMLElement | null> | undefined)[];
    render(): JSX.Element;
}
export default Popover;
