import { ZodObject, ZodTransformer } from 'zod';
import { type Errors, type FormState } from '../reducers/formReducer.jsx';
interface InputEvent {
    detail: {
        value: string;
    };
}
export type BindInput = (event: InputEvent) => any;
export type SetValue<T> = (field: keyof T, value: any) => any;
export type SetError<T> = (field: keyof T, error: any) => any;
export type ValidateFunc<T> = (values: T) => Errors<T>;
export type OnSubmit<T> = (values: T, helpers: {
    setValue: SetValue<T>;
    setError: SetError<T>;
}) => any;
export declare const useForm: <T>(onSubmit: OnSubmit<T>, initialValues?: T, validate?: ValidateFunc<T>, schema?: ZodObject<any> | ZodTransformer<any>) => FormHookValue<T>;
export type FormHookValue<T> = FormState<T> & {
    handleInput: (field: keyof T) => BindInput;
    handleBlur: (field: keyof T) => () => any;
    handleSubmit: () => any;
    resetForm: () => any;
    setValue: SetValue<T>;
    setError: SetError<T>;
    isSubmitting: boolean;
};
export {};
