import { type RefObject } from "react";
import { type ReferenceType } from "@floating-ui/react";
/**
 * Data attribute to identify elements that should not trigger outside click closure.
 *
 * @internal
 */
export declare const FLOATING_ELEMENT_DATA_ATTR = "data-gd-floating-element";
/**
 * Register a floating panel ↔ anchor association. The dismiss hook walks
 * the anchor's DOM ancestry to decide whether a click inside the panel is
 * actually inside our subtree.
 *
 * @internal
 */
export declare function registerFloatingAnchor(panel: Element | null, anchor: Element | null): void;
/**
 * Wraps a floating-ui `setFloating` callback so the resulting ref also
 * registers the panel↔anchor association in {@link floatingPanelAnchors}.
 * Co-locates the registry write next to its consumer so every floating
 * primitive gets nested-popup detection without re-implementing the wiring.
 *
 * Accepts the anchor as `Element | null` directly or as a getter — the
 * getter form lets consumers read a floating-ui MutableRefObject lazily,
 * at the moment the floating element mounts.
 *
 * @internal
 */
export declare function useRegisterFloatingAnchor(setFloating: (node: HTMLElement | null) => void, anchor: Element | null | (() => Element | null)): (node: HTMLElement | null) => void;
/**
 * Whether `target` lives inside the subtree owned by `ownFloating` — either
 * directly (DOM containment) or transitively through a nested floating panel
 * whose anchor chain leads back into `ownFloating`. Both portal to body, so
 * DOM containment alone can't distinguish nested children from foreign
 * siblings; the floating-panel-anchor registry bridges the gap.
 *
 * @internal
 */
export declare function isClickInsideOwnSubtree(target: Element | null, ownFloating: Element | null): boolean;
/**
 * @internal
 */
export interface IUseCloseOnOutsideClickOptions {
    floatingRef: RefObject<HTMLElement | null>;
    anchorRef: RefObject<ReferenceType | null>;
    ignoreClicksOn?: Array<string | HTMLElement>;
    shouldCloseOnClick?: (event: Event) => boolean;
}
/**
 * Hook to trigger a callback when clicking outside of a target element.
 *
 * @internal
 */
export declare function useCloseOnOutsideClick(isOpen: boolean, onClose: () => void, options: IUseCloseOnOutsideClickOptions): void;
//# sourceMappingURL=useCloseOnOutsideClick.d.ts.map