import { Ref } from 'react'; /** * Compose two or more refs into a single callback ref. Returns `null` if all inputs are nullish, * or the lone non-nullish ref when only one is provided. * * Composed callbacks are cached pairwise in a WeakMap keyed by the input refs, so repeated calls * with the same inputs return the same callback identity - preserving referential stability across * renders without requiring callers to wrap in `useMemo` / `useCallback`. * * Adapted from the (now unmaintained) `@seznam/compose-react-refs` package by Seznam.cz, * https://github.com/seznam/compose-react-refs - MIT licensed. * * Prefer the `useComposedRefs` hook variant within component render functions - it also forwards * React 19 ref-callback cleanups, which this legacy form does not. */ export declare function composeRefs(...refs: [Ref, Ref, ...Array>]): Ref; /** * Compose two or more refs into a single callback ref, with identity managed by `useCallback` and * keyed on the input refs. The preferred form within component render functions - see * `composeRefs` for the non-hook variant, required where hooks are unavailable (conditional * composition, cloned children, render props). * * Nullish inputs are skipped. React 19 ref-callback cleanups are forwarded: if any input callback * returns a cleanup, the composed callback returns a combined cleanup, so React invokes cleanups * on detach rather than calling back with `null`. Inputs without their own cleanup still get the * legacy null-assignment. */ export declare function useComposedRefs(...refs: [Ref, Ref, ...Array>]): Ref;