import * as React from "react";
import { CSSProperties, FormEvent, ReactElement } from "react";
import './index.scss';
export interface FormValue {
    [K: string]: any;
}
export interface FormRule {
    [K: string]: any;
    message: string;
}
export interface FormErrors {
    [K: string]: string[];
}
interface FormItemCol {
    span?: number;
    style?: CSSProperties;
}
interface FormLayout {
    labelCol?: FormItemCol;
    wrapperCol?: FormItemCol;
    style?: CSSProperties;
}
export interface FormField {
    key: string;
    label?: string;
    formItem: {
        type: string;
        item?: ReactElement<any>;
    };
    rules?: Array<FormRule>;
}
interface IProps {
    values: FormValue;
    fields: Array<FormField>;
    onSubmit?: (values: FormValue, e: FormEvent) => void;
    onChange?: (values: FormValue, errors: FormErrors) => void;
    validateErrors?: () => void;
    formLayout?: FormLayout;
    formItemStyle?: 'google' | 'grid';
}
declare const Form: React.FunctionComponent<IProps>;
export default Form;
