/** * Traps keyboard focus within `containerRef` when `enabled` is `true`. * * Attaches a document-level `keydown` listener (via `useDocumentEvent`) and * intercepts `Tab` / `Shift+Tab` to keep focus cycling inside the container. * The listener is added/removed automatically when `enabled` changes or the * component unmounts. * * @param containerRef - Ref to the DOM element that should contain focus. * @param enabled - Whether the trap is active. Pass `false` to disable without unmounting. * * @example * ```tsx * // Modal dialog – trap always active while open * useFocusTrap(contentRef, isOpen); * * // Popover – opt-in via prop * useFocusTrap(contentRef, isOpen && trapFocus); * ``` */ export declare function useFocusTrap(containerRef: React.RefObject, enabled: boolean): void;