import { type PropsWithChildren } from 'react'; type PortalContextValue = HTMLElement | null; export declare const useClosestTargetDomNode: () => PortalContextValue; type TargetDomNodeProviderProps = PropsWithChildren<{ targetDomNode: PortalContextValue; }>; /** * This is a wrapper of TargetDomNodeContext.Provider, it provides the targetDomNode to the children. * * When children components use the useClosestTargetDomNode hook, it will return the targetDomNode provided by this component. */ export declare function TargetDomNodeProvider({ targetDomNode, children }: TargetDomNodeProviderProps): import("react/jsx-runtime").JSX.Element; /** * This hook provides the targetDomNode for the Portal component. * It will return the user provided targetDomNode if it is not null, otherwise it will return the closest targetDomNode from the TargetDomNodeContext. * * @param providedTargetDomNode - The targetDomNode provided by the user. * * @param hangingElement - The element to detect the rootNode, if not provided, it will return the body element of the ownerDocument, or automatically create & choose the custom element under ShadowDOM. */ export declare const useAutomaticTargetDomNode: (providedTargetDomNode?: PortalContextValue, hangingElement?: HTMLElement | null) => HTMLElement; export {};