import { type ComponentType } from 'react';
/**
 * ESM-native reimplementation of the minimal `react-confirm` surface used by this package.
 * `react-confirm` is published as CommonJS and calls `require('react')`, which breaks in
 * consumers that bundle this package's ESM output with `react` marked as external.
 * This module is API-compatible with react-confirm's default `createConfirmation`
 * (DOM-tree mounter) for the subset of functionality used by `confirm.tsx`.
 */
export type ConfirmDialogProps<P, R> = {
    dismiss: () => void;
    proceed: (value: R) => void;
    cancel: (value?: unknown) => void;
    show: boolean;
} & P;
export type ConfirmDialog<P, R> = ComponentType<ConfirmDialogProps<P, R>>;
interface ConfirmableInjected<R> {
    dispose: () => void;
    resolve: (value: R) => void;
    reject: (value?: unknown) => void;
}
type ConfirmableComponent<P, R> = ComponentType<P & ConfirmableInjected<R>>;
export declare const confirmable: <P, R>(Component: ConfirmDialog<P, R>) => ConfirmableComponent<P, R>;
export declare const createConfirmation: <P, R>(Component: ConfirmableComponent<P, R>, unmountDelay?: number, mountingNode?: HTMLElement) => ((props: P) => Promise<R>);
export {};
//# sourceMappingURL=imperative-confirm.d.ts.map