import { Component } from 'react';
import Field from '../field';
import { HTMLAttributesWeak } from '../utils/types';
import { ItemSize, LabelAlign, TextAlign } from './context';
import { SubmitCallback } from './utils';
export interface FormProps extends HTMLAttributesWeak {
    prefix?: string;
    labelAlign?: LabelAlign;
    labelWidth?: string | number;
    labelTextAlign?: TextAlign;
    contentAlign?: TextAlign;
    size?: ItemSize;
    field?: Field;
    saveField?: (field: Field) => void;
    scrollToFirstError?: boolean;
    autoUnmount?: boolean;
    autoValidate?: boolean;
    value?: any;
    defaultValue?: any;
    useLabelForErrorMessage?: boolean;
    onChange?: (value: any, { name: string, value: any, field: Field }: {
        name: any;
        value: any;
        field: any;
    }) => void;
    onSubmit?: SubmitCallback;
    isPreview?: boolean;
    children?: any;
}
export default class Form extends Component<FormProps> {
    mapNameToGuid: {
        [x: string]: string;
    };
    protected field: Field;
    protected validateCallback: Array<() => void>;
    constructor(props: FormProps);
    submit(callback: SubmitCallback, skipValidate?: boolean): void;
    submit(names: string[], callback: SubmitCallback, skipValidate?: boolean): void;
    reset(toDefault?: boolean, names?: string[]): void;
    getValue(names?: string[]): any;
    setValue(values: {
        [x: string]: any;
    }): void;
    componentDidUpdate(prevProps: FormProps): void;
    handleChange(name: string, value: any): void;
    handleAfterValidate(data: any): void;
    onValidate(cb: () => void): () => void;
    render(): JSX.Element;
}
