import { ChangeEventHandler } from 'react'; import { UseControlValueStateProps } from './useControlValueState'; export interface UseInputControlValueProps extends Omit, 'defaultValue' | 'equalityFn'> { defaultValue?: string; onChange?: ChangeEventHandler; } /** * 管理 Input/Textarea 文字值的受控狀態 Hook。 * * 支援受控(`value`)與非受控(`defaultValue`)兩種用法, * 回傳當前文字值與穩定的 `onChange` 事件處理器。 * * @example * ```tsx * import { useInputControlValue } from '@mezzanine-ui/react'; * * function MyInput({ value, onChange }) { * const [inputValue, handleChange] = useInputControlValue({ value, onChange }); * return ; * } * ``` * * @see {@link Input} 搭配的元件 * @see {@link Textarea} 搭配的元件 */ export declare function useInputControlValue(props: UseInputControlValueProps): readonly [string, (event: import("react").ChangeEvent) => void];