import { default as React, RefObject } from 'react'; type ClickOutsideTargets = Array> | string; /** * Registers a global click listener and fires a callback when the user * clicks *outside* the specified targets. * * Supported modes: * - **Ref array:** multiple elements treated as “inside” * - **CSS selector:** e.g. `[data-menu-group="menu_123"]` * * Additional option: * - **extraRef:** a single additional element treated as inside * (useful for anchor buttons that open menus) * * @remarks * Listens on `pointerdown`, not `mousedown` * * @param active - Enables or disables the listener * @param targets - Array of refs **or** a CSS selector string * @param onOutside - Called when the click occurs outside all targets * @param extraRef - Optional extra element treated as inside * * @example * // Mode A: array of refs * useClickOutside(open, [menuRef, contentRef], onClose); * * @example * // Mode B: CSS selector * useClickOutside(open, `[data-menu-group="${groupId}"]`, onClose); * * @example * // With extraRef (e.g., anchor button) * useClickOutside(open, `[data-menu-group="${groupId}"]`, onClose, anchorRef); * * @category Hooks * */ export declare function useClickOutside(active: boolean, targets: ClickOutsideTargets, onOutside: () => void, extraRef?: RefObject | null): void; export {};