/** * Props for useControlledState hook. */ interface IControlledStateProps { /** Controlled value. */ value?: T; /** Default value for uncontrolled usage. */ defaultValue?: T; } /** * Hook for controlled/uncontrolled state management. * Supports both patterns seamlessly — when `value` is provided, it's controlled; * otherwise uses internal state initialized from `defaultValue`. * * @param props - Value, defaultValue, and onChange callback * @returns Tuple of [currentValue, setValue] * * @example * ```tsx * const [open, setOpen] = useControlledState({ * value: props.open, * defaultValue: false, * onChange: props.onOpenChange, * }); * ``` */ export declare function useControlledState(props: IControlledStateProps & { onChange?: (value: T, ...args: Rest) => void; }): readonly [T, (next: T, ...args: Rest) => void]; export type { IControlledStateProps }; //# sourceMappingURL=UseControlledState.d.ts.map