import { ChangeEvent, MouseEvent, RefObject } from 'react'; import { UseInputControlValueProps } from './useInputControlValue'; export interface UseInputWithClearControlValueProps extends UseInputControlValueProps { ref: RefObject; } /** * 為可清除 Input 提供值管理的受控狀態 Hook。 * * 在 `useInputControlValue` 的基礎上額外提供 `onClear` 清除處理器, * 透過操作原生 DOM ref 模擬一個值為空字串的 change 事件,確保受控流程完整。 * * @example * ```tsx * import { useInputWithClearControlValue } from '@mezzanine-ui/react'; * * const inputRef = useRef(null); * const [value, onChange, onClear] = useInputWithClearControlValue({ * ref: inputRef, * value: controlledValue, * onChange: handleChange, * }); * ``` * * @see {@link Input} 搭配的元件(clearable 變體) */ export declare function useInputWithClearControlValue(props: UseInputWithClearControlValueProps): readonly [string, (event: ChangeEvent) => void, (event: MouseEvent) => void];