import { type RefObject } from 'react'; import { type TPhase } from './use-animated-visibility'; /** * Wraps Tab/Shift+Tab focus within a popover element when its role * semantically requires it (dialog, alertdialog). * * While the popover is open, Tab and Shift+Tab are intercepted * (via `preventDefault`) and remapped to cycle through focusable * elements within the container using wrapping navigation. * * Light dismiss (Escape, click outside) continues to work natively * via `popover="auto"` - this hook only intercepts Tab. * * Always call this hook unconditionally. The listener is only * attached when the role requires focus wrapping, and is cleaned * up and re-evaluated when the role changes. */ export declare function useFocusWrap({ elementRef, role, phase, }: { elementRef: RefObject; role: string | undefined; /** * Whether the element is open. Used to attach the Tab listener. */ phase: TPhase; }): void;