import type { Field } from "./createField";
export declare type OnSubmitArg = {
    fields: Record<string, Field<any>>;
    rawValues: Record<string, any>;
    values: Record<string, any>;
};
export declare type OnSubmitFn = (props: OnSubmitArg) => any;
export declare type CreateFormArgs = {
    onSubmit: OnSubmitFn;
};
export declare type Form = ReturnType<typeof createForm>;
export declare function createForm({ onSubmit }: CreateFormArgs): {
    fields: Record<string, Field<any, any>>;
    state: {
        isSubmitting: boolean;
        valuesAtLastSubmit: string | undefined;
        submitCount: number;
    };
    computed: {
        readonly isDirty: boolean;
        readonly errorList: (string | undefined)[];
        readonly isError: boolean;
        readonly isValid: boolean;
        readonly valueList: string;
        readonly isChangedSinceLastSubmit: boolean;
    };
    actions: {
        add(field: Field<any>): void;
        submit: () => any;
    };
};
