import { RefObject } from 'react'; /** * Remembers the element that had focus when `isOpen` became true, read during * render — before children with autoFocus take focus — so it can be restored. */ export declare const useOpenerElement: (isOpen: boolean) => import("react").MutableRefObject; interface FocusTrapOptions { active: boolean; /** Element to focus on activation; defaults to the first focusable child. */ initialFocusRef?: RefObject; /** Return focus to the element that was focused before activation. */ restoreFocus?: boolean; /** Explicit element to return focus to (see useOpenerElement). */ returnFocusRef?: RefObject; /** * Keep Tab/Shift+Tab inside the container (modal). When false, focus only * moves in on activation and back out afterwards (non-modal panel). */ trapTab?: boolean; } export declare const isTopMostFocusTrap: (container: HTMLElement | null) => boolean; export declare const getTopMostFocusTrap: () => HTMLElement | null; /** * Moves keyboard focus into a dialog when it opens, optionally keeps it there * while it is modal, and restores it to the trigger afterwards — WCAG 2.4.3 * Focus Order and 2.1.2 No Keyboard Trap (focus is released on close). */ declare const useFocusTrap: (containerRef: RefObject, { active, initialFocusRef, restoreFocus, trapTab, returnFocusRef, }: FocusTrapOptions) => void; export default useFocusTrap;