import { ChangeEvent, FocusEvent } from 'react'; import { FieldProps, FieldRenderProps, FieldInputProps } from 'react-final-form'; import { Validator } from './validate'; export interface InputProps extends Omit, HTMLElement>, 'validate' | 'children'> { defaultValue?: any; id?: string; input?: FieldInputProps; meta?: any; name?: string; onBlur?: (event: FocusEvent) => void; onChange?: (event: ChangeEvent | any) => void; onFocus?: (event: FocusEvent) => void; options?: T; resource?: string; source: string; validate?: Validator | Validator[]; isRequired?: boolean; } export interface UseInputValue extends FieldRenderProps { id: string; isRequired: boolean; } declare const useInput: ({ defaultValue, initialValue, id, name, source, validate, onBlur: customOnBlur, onChange: customOnChange, onFocus: customOnFocus, isRequired: isRequiredOption, ...options }: InputProps) => UseInputValue; export default useInput;