/**
 * Type helper for onChange callbacks that can handle string-only callbacks
 * when the value might be string | undefined
 */
type ControlledStateCallback<T> = T extends string | undefined ? ((value: string) => void) | ((value: T) => void) : (value: T) => void;
/**
 * Custom hook to manage controlled/uncontrolled state pattern
 * Handles both controlled mode (when value and onChange are provided)
 * and uncontrolled mode (when using internal state)
 *
 * @param controlledValue The externally controlled value
 * @param defaultValue Default value for uncontrolled mode
 * @param onChange Callback for when value changes in controlled mode
 * @returns Object with value, setValue function, and isControlled flag
 */
export default function useControlledState<T, V extends T = T>(controlledValue: T | undefined, defaultValue: V, onChange?: ControlledStateCallback<T>): {
    value: T;
    setValue: (newValue: T) => void;
    isControlled: boolean;
};
export {};
