import React, { Dispatch, ReactNode, SetStateAction } from 'react';
import { IconName } from '../kit/Icon';
import { ErrorHandler } from '../kit/utils/error';
import { ValueOf } from '../kit/utils/types';
export type ModalSize = 'small' | 'medium' | 'large';
declare const ModalCloseReason: {
    Cancel: string;
    Ok: string;
};
export type ModalCloseReason = ValueOf<typeof ModalCloseReason>;
export type Opener = Dispatch<SetStateAction<boolean>>;
export type ModalContext = {
    isOpen: boolean;
    setIsOpen: Opener;
};
export interface ModalSubmitParams {
    disabled?: boolean;
    text: string;
    handler: (e: React.MouseEvent) => Promise<void> | void;
    onComplete?: () => Promise<void> | void;
    handleError: ErrorHandler;
    form?: string;
}
interface ModalProps {
    cancel?: boolean;
    cancelText?: string;
    danger?: boolean;
    footer?: React.ReactNode;
    footerLink?: React.ReactNode;
    headerLink?: React.ReactNode;
    icon?: IconName;
    key?: string;
    onClose?: () => void;
    size?: ModalSize;
    submit?: ModalSubmitParams;
    title: string;
    children: ReactNode;
}
export declare const DEFAULT_CANCEL_LABEL = "Cancel";
export declare const Modal: React.FC<ModalProps>;
export declare const useModal: <ModalProps_1 extends object>(Comp: React.FC<ModalProps_1>) => {
    close: (reason: ModalCloseReason) => void;
    Component: React.FC<ModalProps_1>;
    open: () => void;
};
export {};
//# sourceMappingURL=Modal.d.ts.map