/**
 * use-anchor-portal — computes fixed-position rect from an anchor element
 * and provides a stable portal container mounted to document.body.
 *
 * Used by dropdown components to escape stacking context issues in
 * Shopify themes (position:relative / transform ancestors).
 *
 * Usage:
 *   const { portalStyle, wrapWithPortal } = useAnchorPortal(anchorRef);
 *   // In render: return wrapWithPortal(<YourDropdown style={portalStyle} />)
 *
 * Backward-compat: if anchorRef is undefined or has no current element,
 * wrapWithPortal returns the node as-is and portalStyle is undefined.
 */
import { RefObject } from "react";
import React from "react";
export interface AnchorPortalStyle {
    position: "fixed";
    top: number;
    left: number;
    width: number;
    zIndex?: number;
}
export interface UseAnchorPortalResult {
    /** Inline style to apply to the dropdown root when portaling */
    portalStyle: AnchorPortalStyle | undefined;
    /** Wraps the node in a portal when anchorRef is active, else returns as-is */
    wrapWithPortal: (node: React.ReactElement) => React.ReactNode;
    /** Current position attribute: "below" | "above" | undefined */
    dataPosition: "below" | "above" | undefined;
}
/**
 * @param anchorRef   Ref to the element the dropdown should appear under.
 * @param dropdownHeight  Estimated dropdown height for flip-up logic (px, default 400).
 * @param zIndex      Optional z-index to include in the computed style.
 */
export declare function useAnchorPortal(anchorRef: RefObject<HTMLElement> | undefined, dropdownHeight?: number, zIndex?: number): UseAnchorPortalResult;
//# sourceMappingURL=use-anchor-portal.d.ts.map