import type { ElementOrRef } from '../types'; type FocusTrapMetadata = { targetElement: Element; lastFocusedElement: HTMLElement | null; suspended: boolean; }; type FocusTrap = { initialFocusElement: HTMLElement | null; destroy: () => void; } & FocusTrapMetadata; export default function useFocusTrap(target: ElementOrRef, options?: { /** * When set to false, deactivates the focus trap. This can be necessary if * a component needs to conditionally manage focus traps. */ disabled?: boolean; /** * When the trap is activated, an optional custom element or ref * can be provided to override the default initial focus element behavior. */ initialFocusElement?: ElementOrRef; /** * When set to true and the trap is deactivated, this will return focus * back to the original active element or the return focus element if * provided. */ returnFocus?: boolean; /** * When the trap is deactivated, an optional custom element or ref * can be provided to override the default active element behavior. */ returnFocusElement?: ElementOrRef; }): React.RefObject>; export {};