import { type Dispatch, type SetStateAction } from "react"; /** Function that handles state changes */ type ChangeHandler = (state: T) => void; /** React's setState dispatch function type */ type SetStateFn = Dispatch>; /** * Parameters for the useControllableState hook */ interface UseControllableStateParams { /** Name of the component using this hook (for warning messages) */ caller?: string; /** The default value to use in uncontrolled mode */ defaultProp: T; /** Callback fired when the value changes */ onChange?: ChangeHandler; /** * The controlled value. If provided, component is in controlled mode. * If undefined, component is in uncontrolled mode. */ prop?: T | undefined; } /** * Hook for managing state that can be either controlled or uncontrolled * * Allows components to support both controlled and uncontrolled modes. * In controlled mode, the value is provided by the parent component. * In uncontrolled mode, the value is managed internally. */ export declare function useControllableState({ prop, defaultProp, onChange, caller, }: UseControllableStateParams): [T, SetStateFn]; export {};