import React, { ElementType, MutableRefObject, Ref } from 'react'; import { Props } from '../../types.js'; import { RefProp, HasDisplayName } from '../../utils/render.js'; declare let DEFAULT_PORTAL_TAG: React.ExoticComponent<{ children?: React.ReactNode; }>; interface PortalRenderPropArg { } export type PortalProps = Props; declare function PortalFn(props: PortalProps, ref: Ref): React.ReactPortal | null; declare let DEFAULT_GROUP_TAG: React.ExoticComponent<{ children?: React.ReactNode; }>; interface GroupRenderPropArg { } export type PortalGroupProps = Props & { target: MutableRefObject; }; declare function GroupFn(props: PortalGroupProps, ref: Ref): JSX.Element; export declare function useNestedPortals(): readonly [React.MutableRefObject, ({ children }: { children: React.ReactNode; }) => JSX.Element]; interface ComponentPortal extends HasDisplayName { (props: PortalProps & RefProp): JSX.Element; } interface ComponentPortalGroup extends HasDisplayName { (props: PortalGroupProps & RefProp): JSX.Element; } export declare let Portal: ComponentPortal & { Group: ComponentPortalGroup; }; export {};