/** * Copyright IBM Corp. 2025 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { type RefObject } from 'react'; export interface PresenceContext { /** * The ref object the presence mode is mounted with */ presenceRef: RefObject; /** * Indicates whether the ref object is currently exiting */ isExiting: boolean; /** * Returns if the caller is exclusive to this presence context */ isPresenceExclusive: (id: string) => boolean; /** * Registers a pending JS-driven exit animation (e.g. a motion surface) * that `getAnimations()` cannot observe. The presence exit does not finish * until the returned release function is called. */ holdExit: () => () => void; } /** * Generic channel for presence providers (ModalPresence, * ComposedModalPresence). Lets presence-aware children — like MotionSurface — * register exit holds without depending on component-level context modules. */ export declare const PresenceHoldContext: import("react").Context; /** * Returns if the presence node is present and the context value to be used by a presence context, e.g. ModalPresence. */ export declare const usePresenceContext: (open: boolean, initialPresenceId?: string) => readonly [boolean, PresenceContext];