import React from 'react';
import { BeforeCallback } from '../state/DelayedCallback';
import { TimerApi } from '../state/Timer';
export declare type Callback = () => void;
export interface DelayedToggleConfig {
    /**
     * @since 10.19.0
     */
    beforeDisable?: BeforeCallback;
    /**
     * @since 10.19.0
     */
    beforeEnable?: BeforeCallback;
    /**
     * @since 10.19.0
     */
    disableDelay?: number;
    /**
     * @since 10.19.0
     */
    enableDelay?: number;
    /**
     * @since 10.19.0
     */
    isEnabled?: boolean;
    /**
     * @since 10.19.0
     */
    onDisable: Callback;
    /**
     * @since 10.19.0
     */
    onEnable: Callback;
    /**
     * @since 10.19.0
     */
    timer?: TimerApi;
}
export interface DelayedToggleProps extends DelayedToggleConfig {
    /**
     * @since 10.19.0
     */
    children: React.ReactNode;
}
interface DelayedToggleRenderProps extends DelayedToggleConfig {
    /**
     * @since 10.19.0
     */
    children: React.ReactElement | ((props: Api) => React.ReactElement);
}
export interface Api {
    /**
     * @since 10.19.0
     */
    disable: (event: any) => any;
    /**
     * @since 10.19.0
     */
    enable: (event: any) => any;
    /**
     * @since 10.19.0
     */
    toggle: (event: any) => any;
}
export declare function useDelayedToggle({ beforeDisable, beforeEnable, disableDelay, enableDelay, isEnabled, onDisable, onEnable, timer, }: DelayedToggleConfig): Api;
export declare function withDelayedToggle<T extends {}>(config: DelayedToggleConfig): (Component: React.ComponentType<T>) => (props: T & {
    DelayedToggle: DelayedToggleConfig;
}) => JSX.Element;
export declare const DelayedToggle: React.ForwardRefExoticComponent<DelayedToggleRenderProps & React.RefAttributes<HTMLElement>>;
export declare const initDelayedToggle: Api;
export declare const DelayedToggleContext: React.Context<Api>;
export declare function DelayedToggleProvider({ children, ...props }: DelayedToggleProps): JSX.Element;
export declare function useDelayedToggleContext(): Api;
export declare const consumeDelayedToggle: typeof useDelayedToggleContext;
export {};
