import { ToggleState } from './ToggleState';
import { QueryStatus } from '../model';
import { TypedEmitter } from '../util';
type InteractionFn = () => void | Promise<unknown>;
export interface ModalStateParams {
    onConfirm?: InteractionFn;
    onClose?: InteractionFn;
}
interface CloseOptions {
    result: 'confirmed' | 'declined' | 'dismissed';
}
export declare class ModalState {
    readonly openToggle: ToggleState;
    readonly toggle: (value?: boolean) => void;
    readonly onConfirm?: InteractionFn;
    readonly onClose?: InteractionFn;
    confirming: QueryStatus;
    readonly events: TypedEmitter<{
        open: () => void;
        close: (options: CloseOptions) => void;
        requestClose: () => void;
    }>;
    constructor(params?: ModalStateParams);
    open(): void;
    promise(): Promise<CloseOptions>;
    confirm(): Promise<void>;
    close(): void;
    decline(): void;
    requestClose: () => void;
    get isOpen(): boolean;
}
export {};
//# sourceMappingURL=ModalState.d.ts.map