import React from 'react';
import type { PortalManager } from './PortalManager';
type RenderFn = (children: () => React.ReactChild | JSX.Element | null, container: HTMLElement, key: string, onBeforeReactDomRender?: () => void, immediate?: boolean) => void;
type RemoveFn = (key: string) => void;
type DestoryFn = () => void;
export interface PortalProviderAPI {
    destroy: DestoryFn;
    remove: RemoveFn;
    render: RenderFn;
}
export type PortalRendererComponent = () => JSX.Element;
export type UsePortalProviderReturnType = [
    PortalProviderAPI,
    PortalRendererComponent
];
/**
 * Creates a portal provider for managing multiple React portals. The provider
 * facilitates rendering, removing, and destroying portals managed by a given
 * PortalManager.
 *
 * @param {PortalManager} portalManager - An instance of a PortalManager which
 * is responsible for registering, managing, and destroying portals.
 * @returns {PortalProviderAPI} An object containing methods to render, remove, and destroy
 * portals.
 *  - `render(children, container, key)` Renders a new React portal with the given
 *    children, mounts it into the specified DOM container, and registers it
 *    with the PortalManager using a unique key.
 *  - `remove(key)` Removes a previously rendered portal identified by its key
 *    and deregisters it from the PortalManager.
 *  - `destroy()` Clears all portals managed by this provider and invokes the
 *    destroy method on the PortalManager to clean up any resources.
 *
 */
export declare const getPortalProviderAPI: (portalManager: PortalManager) => PortalProviderAPI;
export { createPortalRendererComponent } from './createPortalRendererComponent';
export { PortalRenderWrapperInner } from './PortalRenderWrapperInner';
