import type { BaseTextInputProps, TextInputState } from '../types'; /** * 文本输入状态管理 Hook * * 管理组件的内部状态,包括: * - 值管理(受控/非受控模式) * - 校验状态管理 * - 事件处理函数封装 * * 支持受控和非受控两种模式: * - 受控模式:value 由外部传入,组件不维护内部状态 * - 非受控模式:使用 defaultValue,组件维护内部状态 * * @param props 组件 Props(包含校验配置) * @returns 文本输入状态对象 * * @example * // 受控模式 * const state = useTextInputState({ value: 'hello', onChange: (v) => console.log(v) }); * * // 非受控模式 * const state = useTextInputState({ defaultValue: 'hello' }); */ export declare function useTextInputState(props: BaseTextInputProps): TextInputState;