import React from 'react';
declare type ConditionalCloseFunction<onClose extends undefined | ((...args: any[]) => any)> = onClose extends (...args: any[]) => any ? onClose : undefined;
interface UseCloseWithConfirmState {
    closeWithConfirm: <onClose extends undefined | ((...args: any[]) => any)>(func: onClose) => ConditionalCloseFunction<onClose>;
    setFormIsDifferent: React.Dispatch<React.SetStateAction<boolean>>;
}
export declare const useCloseWithConfirmState: () => UseCloseWithConfirmState;
export declare const CloseWithConfirmContext: React.Context<UseCloseWithConfirmState>;
export declare const useCloseWithConfirmContext: () => UseCloseWithConfirmState;
export {};
