import React from 'react'; import PortalManager from './portal-manager'; export declare type PortalHostProps = { children: React.ReactNode; RootView?: any; uuid?: string; }; export declare type Operation = { type: 'mount'; key: number; children: React.ReactNode; } | { type: 'update'; key: number; children: React.ReactNode; } | { type: 'unmount'; key: number; }; export declare type PortalMethods = { mount: (children: React.ReactNode, key?: number, uuid?: string) => number; update: (key: number, children: React.ReactNode) => void; unmount: (key: number) => void; }; export declare const PortalContext: React.Context; declare class PortalGuard { private nextKey; private keyMaps; add: (e: React.ReactNode) => number; remove: (key: number) => void; has: (key: number) => boolean; } /** * portal */ export declare const portal: PortalGuard; /** * Portal host renders all of its children `Portal` elements. * For example, you can wrap a screen in `Portal.Host` to render items above the screen. * If you're using the `Provider` component, it already includes `Portal.Host`. * * ## Usage * ```js * import * as React from 'react'; * import { Text } from 'react-native'; * import { Portal } from '@ant-design/react-native'; * * export default class MyComponent extends React.Component { * render() { * return ( * * Content of the app * * ); * } * } * ``` * * Here any `Portal` elements under `` are rendered alongside `` and will appear above `` like a `Modal`. */ export default class PortalHost extends React.Component { static displayName: string; _nextKey: number; _queue: Operation[]; _manager?: PortalManager; _uuid: string; constructor(props: PortalHostProps); getUuid(): string; componentDidMount(): void; componentWillUnmount(): void; _setManager: (manager?: any) => void; _mount: (children: React.ReactNode, _key?: number | undefined) => number; _update: (key: number, children: React.ReactNode) => void; _unmount: (key: number) => void; render(): JSX.Element; } export {};