import type { PointerEvent as ReactPointerEvent, RefObject } from 'react'; /** * Hook that prevents modal closes when clicking on elements stacked above the modal. * * This hook checks if a clicked element is visually above the modal's overlay using * the actual browser stacking order. If it is (e.g., toasts, tooltips), it prevents * the modal from closing. * * @param overlayRef - Ref to the modal's overlay element * @returns Handler function that can be used with onInteractOutside or onPointerDown * * @example * ```tsx * const overlayRef = useRef(null) * const handleInteractOutside = usePreventCloseOnStackedElements(overlayRef) * * return ( * * * * {children} * * * ) * ``` */ export declare function usePreventCloseOnStackedElements(overlayRef: RefObject): (event: CustomEvent | PointerEvent | ReactPointerEvent) => boolean;