import * as React from 'react';
import type { IFormInputProps } from '../inputs';
/**
* This hook can be used to create a FormInput wrapper that maps/transforms the data as needed by the caller's model.
*
* Example map a checkbox value to "ENABLED"/"DISABLED":
* ```tsx
* function EnabledDisabledCheckbox(props: ICheckboxInputProps) {
* const mappedProps = useFormInputValueMapper(
* props,
* (val) => val === 'ENABLED', // model -> input
* (val, event) => event.target.checked ? 'ENABLED' : 'DISABLED', // input -> model
* )
* return ;
* }
```
*
* @param props the incoming props
* @param toInputValue a function that converts from the caller's model to the value the FormInput expects
* @param fromInputValue a function that converts from the value the FormInput returns (via the onChange callback) to the caller's model
*/
export declare function useFormInputValueMapper(props: IFormInputProps, toInputValue: (externalValue: EXT) => INT, fromInputValue: (inputValue: INT, e: React.ChangeEvent) => EXT): {
value: INT;
onChange: (e: React.ChangeEvent) => void;
validation?: import("../inputs").IFormInputValidation;
inputClassName?: string;
onBlur?: {
(e: React.FocusEvent): void;
(fieldOrEvent: T): T extends string ? (e: any) => void : void;
};
name?: string;
};