import React from 'react';
import { BeforeCallback } from '../../state/DelayedCallback';
import { TriggerRenderProps } from '../../state/Trigger';
import { VisibilityConfig } from '../../state/Visibility';
import { OverlayProps } from '../Overlay';
declare type PickedOverlayProps = Pick<OverlayProps, 'canFlip' | 'padding' | 'placement' | 'shrinkOverlay'>;
declare type PickedTriggerProps = Pick<TriggerRenderProps, 'children' | 'trigger'>;
declare type PickedTriggerRenderProps = Pick<TriggerRenderProps, 'children'>;
declare type PickedVisibilityProps = Pick<VisibilityConfig, 'afterHide' | 'afterShow' | 'initialIsVisible'>;
export interface OverlayTriggerProps extends PickedOverlayProps, PickedTriggerProps, PickedTriggerRenderProps, PickedVisibilityProps {
    /**
     * <div>
     *  The callback to run before the overlay is hidden. Returning
     *  <Code>false</Code> will prevent hiding.
     * </div>
     * <CodeBlock>(e: event) => boolean | Promise | undefined</CodeBlock>
     * @since 10.19.0
     */
    beforeHide?: BeforeCallback;
    /**
     * <div>
     *  The callback to run before the overlay is shown. Returning
     *  <Code>false</Code> will prevent showing.
     * </div>
     * <CodeBlock>(e: event) => boolean | Promise | undefined</CodeBlock>
     * @since 10.19.0
     */
    beforeShow?: BeforeCallback;
    /**
     * Additional refs to check for clickOutside behavior
     * @since 10.19.0
     */
    clickOutsideIgnoreRefs?: React.RefObject<HTMLElement>[];
    /**
     * The delay when hiding the overlay
     * @since 10.19.0
     */
    hideDelay?: number;
    hideKeys?: {
        /**
         * Keys to hide the overlay when the overlay is focused
         * @since 10.19.0
         */
        overlay: string[];
        target: string[];
    };
    overlay: React.ReactNode;
    /**
     * Restore focus to the target after the overlay is hidden
     * @default true
     * @since 10.19.0
     */
    restoreFocusOnHide?: boolean;
    /**
     * The delay when showing the overlay
     * @since 10.19.0
     */
    showDelay?: number;
    /**
     * Keys to show the overlay when the target is focused
     * @since 10.19.0
     */
    showKeys?: string[];
}
export declare const OverlayTrigger: React.ForwardRefExoticComponent<OverlayTriggerProps & React.RefAttributes<HTMLElement>>;
export declare function CloseOnFocus({ hide }: {
    hide: (event: any) => any;
}): JSX.Element;
export declare function useOverlayTriggerContext(): {
    hide: (event: any) => any;
    show: (event: any) => any;
    toggle: (event: any) => any;
};
/**
 * @deprecated Please use `useOverlayTriggerContext()` instead
 */
export declare const consumeOverlayTrigger: typeof useOverlayTriggerContext;
export default OverlayTrigger;
