import { UseControlValueStateProps } from './useControlValueState'; export interface UseCustomControlValueProps extends UseControlValueStateProps { onChange?: (value: V) => void; } /** * 通用型別受控值管理 Hook。 * * 支援任意型別的受控(`value`)與非受控(`defaultValue`)狀態, * 並透過 `equalityFn` 避免不必要的 re-render 與 `onChange` 呼叫。 * * @example * ```tsx * import { useCustomControlValue } from '@mezzanine-ui/react'; * * const [value, onChange] = useCustomControlValue({ * defaultValue: 0, * value: controlledNumber, * onChange: (v) => console.log(v), * }); * ``` */ export declare function useCustomControlValue(props: UseCustomControlValueProps): readonly [V, (nextValue: V) => void, (a: V, b: V) => boolean];