import type { FormEvent } from "react";
import type { Callback } from "../Types";
import type { ILoadingStateSetter } from "./useLoadingState";
export declare const useFormState: (callback: IFormStateCallback) => {
    setState: <T extends import("./useLoadingState").ILoadingStateKey>(state: T, value: import("./useLoadingState").ILoadingStateValue<T>) => void;
    resetState: () => void;
    loading: boolean;
    success: boolean;
    error: string | boolean;
    onSubmit: (e: FormEvent<HTMLFormElement>) => void;
};
export type IFormStateCallback = Callback<[
    data: FormData,
    setState: ILoadingStateSetter,
    resetState: Callback
], void | Promise<void>>;
