import { type MutableRefObject, type ForwardedRef, type RefCallback } from "react";
import { type Primitive } from "@synnaxlabs/x";
import { state } from '../state';
/**
 * A ref that satisfies the interface of useState, but returns a ref as the first
 * element of the tuple. This is useful when you want to keep a piece of state
 * but don't want it's changes to trigger a re-render.
 *
 * @param initialValue - The initial value of the ref.
 * @returns a tuple containing the ref and the pseudo-setState function.
 */
export declare const useStateRef: <T extends state.State>(initialValue: state.Initial<T>) => [MutableRefObject<T>, state.Set<T>];
/**
 * Use synced ref keeps the provided value in sync with the returned ref. This is
 * useful when you want access to a piece of state but don't want it's changes
 * to trigger a re-render.
 *
 * @param value - The value to keep in sync with the ref.
 * @returns a ref that is kept in sync with the provided value.
 */
export declare const useSyncedRef: <T>(value: T) => MutableRefObject<T>;
/**
 * Combines multiple refs into one. Note that the returned ref callback will not be
 * updated when the provided refs changes. These refs are only set once, and are assumed
 * to be static throughout the lifetime of the component.
 *
 * @param refs - The refs to combine.
 * @returns - A callback ref that will set all of the provided refs.
 */
export declare const useCombinedRefs: <T>(...refs: ForwardedRef<T>[]) => RefCallback<T>;
export declare const useCombinedStateAndRef: <T extends object | Primitive>(initialState: state.Initial<T>) => [T, state.Set<T>, MutableRefObject<T>];
export declare const usePrevious: <T>(value: T) => T | undefined;
