/** * Copyright IBM Corp. 2025, 2026 * * 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 declare const usePresence: (ref: RefObject, isOpen: boolean, /** * Number of pending JS-driven exit animations (e.g. motion surfaces) * registered through the presence context. The exit does not finish while * holds are outstanding, since those animations are invisible to * `getAnimations()`. */ exitHoldCount?: number, /** * Override the animation-name prefix used to identify presence animations. * Defaults to `${prefix}--presence` which matches the global convention. * Pass a custom prefix when a component names its animations differently, * e.g. `${prefix}--tearsheet--presence`. */ animationNamePrefix?: string) => { /** * Indicates whether the ref object is supposed to be mounted */ isPresent: boolean; /** * Indicates whether the ref object is currently exiting */ isExiting: boolean; };