import type { ReactElement } from 'react';
import type { Root } from 'react-dom/client';
import React from 'react';
declare type ImperativeProps = {
    open?: boolean;
    onCancel?: () => void;
    afterClose?: () => void;
};
declare type TargetElement = ReactElement<ImperativeProps>;
export declare type ImperativeHandler = {
    close: () => void;
    replace: (element: TargetElement) => void;
    isRendered?: () => boolean;
};
export declare type UnmountType = () => Promise<void>;
export declare type RenderType = (node: React.ReactElement, container: Element | DocumentFragment) => UnmountType;
declare const MARK = "__pisell_react_root__";
declare type ContainerType = (Element | DocumentFragment) & {
    [MARK]?: Root;
};
export declare function render(node: React.ReactElement, container: ContainerType): void;
export declare function unmount(container: ContainerType): Promise<void>;
/**
 * @deprecated 设置 React 渲染函数以兼容使用。
 */
export declare function unstableSetRender(render?: RenderType): RenderType;
export declare function renderImperatively(element: TargetElement): ImperativeHandler;
export {};
