import React from 'react';
import type { IntlShape, WrappedComponentProps } from 'react-intl-next';
import type { FireAnalyticsCallback } from '../../analytics';
import { EventDispatcher } from '../../event-dispatcher';
export type BasePortalProviderProps = {
    render: (portalProviderAPI: PortalProviderAPI) => React.ReactChild | JSX.Element | null;
    onAnalyticsEvent?: FireAnalyticsCallback;
    useAnalyticsContext?: boolean;
} & WrappedComponentProps;
export type Portals = Map<HTMLElement, React.ReactChild>;
export type PortalRendererState = {
    portals: Portals;
};
type MountedPortal = {
    key: string;
    children: () => React.ReactChild | null;
    hasAnalyticsContext: boolean;
    hasIntlContext: boolean;
};
export declare class PortalProviderAPI extends EventDispatcher {
    portals: Map<HTMLElement, MountedPortal>;
    context: any;
    intl: IntlShape;
    onAnalyticsEvent?: FireAnalyticsCallback;
    useAnalyticsContext?: boolean;
    constructor(intl: IntlShape, onAnalyticsEvent?: FireAnalyticsCallback, analyticsContext?: boolean);
    setContext: (context: any) => void;
    render(children: () => React.ReactChild | JSX.Element | null, container: HTMLElement, key: string, hasAnalyticsContext?: boolean, hasIntlContext?: boolean): void;
    forceUpdate({ intl }: {
        intl: IntlShape;
    }): void;
    remove(key: string, container: HTMLElement): void;
}
export declare const PortalProvider: React.FC<import("react-intl-next").WithIntlProps<BasePortalProviderProps>> & {
    WrappedComponent: React.ComponentType<BasePortalProviderProps>;
};
type PortalProviderWithThemeProvidersProps = Omit<BasePortalProviderProps, 'intl' | 'themeMode'>;
export declare const PortalProviderWithThemeProviders: ({ onAnalyticsEvent, useAnalyticsContext, render, }: PortalProviderWithThemeProvidersProps) => JSX.Element;
export declare class PortalRenderer extends React.Component<{
    portalProviderAPI: PortalProviderAPI;
}, PortalRendererState> {
    constructor(props: {
        portalProviderAPI: PortalProviderAPI;
    });
    handleUpdate: (portals: Portals) => void;
    render(): JSX.Element;
}
export {};
