import React from 'react';
import type { IModalProps } from './Modal';
/** The Modal content Component will be passed these two props */
export interface IModalComponentProps<C = any, D = any> {
    closeModal?(result?: C): void;
    dismissModal?(result?: D): void;
}
interface ModalCloseResult<T> {
    status: 'CLOSED';
    closeResult: T;
}
interface ModalDismissResult<T> {
    status: 'DISMISSED';
    dismissResult?: T;
}
export declare type IModalResult<C, D> = ModalCloseResult<C> | ModalDismissResult<D>;
/**
 * An imperative API for showing a react component as a modal.
 *
 * example:
 * const MyComponent = ({ closeModal, dismissModal }) => {
 *   <h1>Modal Contents!</h1>
 *   <button onClick={() => closeModal('A')}>Choice A</button>
 *   <button onClick={() => closeModal('B')}>Choice B</button>
 *   <button onClick={() => dismissModal('cancelled')}>Cancel</button>
 * }
 *
 * ...
 *
 * showModal(MyComponent).then(result => {
 *   this.setState({ result });
 * });
 *
 * @param ModalComponent the component to be rendered inside a modal
 * @param componentProps to pass to the ModalComponent
 * @param modalProps props to pass to the modal itself
 * @returns {Promise<IModalResult<C, D>}
 */
export declare const showModal: <P, C = any, D = any>(ModalComponent: React.ComponentType<P & IModalComponentProps<C, D>>, componentProps?: P, modalProps?: Omit<IModalProps, 'isOpen' | 'onRequestClose' | 'onAfterClose' | 'children'>) => Promise<IModalResult<C, D>>;
export {};
