import { type RefObject } from 'react'; /** * A registered `FocusScope` with `contain`. Used by the FocusProvider's * scope stack so that nested scopes (e.g. a Modal inside a Sheet) can * cooperate: only the topmost scope is the active focus-containment owner. * @internal */ export type FocusScopeRegistration = { wrapperRef: RefObject; triggerElement: HTMLElement | undefined; }; /** * Defines the contents of the FocusContext. * @internal */ export type FocusContextProps = { backgroundInertness?: boolean; /** * Increments (true) or decrements (false) the active-scope counter that * controls whether the provider's wrapper is `inert`. Reference counted * so that nested scopes do not clear the parent's inertness when they * unmount. */ setBackgroundInertness: (value: boolean) => void; focusTriggerElement: (value: HTMLElement | undefined) => void; /** * Push a contain-scope onto the active-scope stack. Returns a function * that pops the scope off again. */ registerScope: (scope: FocusScopeRegistration) => () => void; /** Returns the currently topmost contain-scope, if any. */ getTopScope: () => FocusScopeRegistration | undefined; /** Returns whether the given element is inside any registered scope. */ isInsideAnyScope: (element: Element | null) => boolean; }; /** * This context keeps all information needed for proper focus management. * @param backgroundInertness - if the background (behind overlays) is currently inert (inactive) * @param setBackgroundInertness - updates the backgrounds active status * @internal */ export declare const FocusContext: import("react").Context;