import * as React from 'react';
import * as Validator from '../validation';
import { IFormContext } from './Context';
import { FormType } from './interfaces';
export interface IFormFieldInternalProps<T> {
    form: string;
    formType?: FormType;
    initialValues?: Partial<T>;
    sectionName?: string;
    change: <FK extends DeepKeyOf<T>>(field: FK, value: DeepTypeOf<T, FK>) => void;
}
export interface IFormFieldPublicProps<T, K extends DeepKeyOf<T>, P, V = any> {
    autoComplete?: string;
    className?: string;
    componentClassName?: string;
    labelClassName?: string;
    hideRequiredStar?: boolean;
    component: React.ComponentType<P>;
    description?: string;
    disabled?: boolean | ((values: Partial<T>) => boolean);
    readOnly?: boolean | ((values: Partial<T>) => boolean);
    inline?: boolean;
    label?: string;
    name: K;
    placeholder?: string;
    required?: boolean | ((values: Partial<T>) => boolean);
    validate?: Array<Validator.Validator<DeepTypeOf<T, K> & V, T, P>>;
    warn?: Array<Validator.Validator<DeepTypeOf<T, K> & V, T, P>>;
    defaultValue?: DeepTypeOf<T, K> & V;
    prefillOnMount?: boolean;
    clearOnUnmount?: boolean;
    visible?: boolean | ((values: Partial<T>, form?: IFormContext<any>) => boolean);
    props?: Partial<P>;
    structure?: string;
    format?(value?: DeepTypeOf<T, K> & V): DeepTypeOf<T, K> & V;
    parse?(value?: DeepTypeOf<T, K> & V): DeepTypeOf<T, K> & V;
    normalize?(value?: DeepTypeOf<T, K> & V, previousValue?: DeepTypeOf<T, K> & V, allValues?: Partial<T>, allPreviousValues?: Partial<T>): DeepTypeOf<T, K> & V;
    normalizeOnBlur?(value?: DeepTypeOf<T, K> & V): DeepTypeOf<T, K> & V;
    onChange?(event: React.ChangeEvent<any> | undefined, value: (DeepTypeOf<T, K> & V) | undefined, oldValue: (DeepTypeOf<T, K> & V) | undefined, change: (key: DeepKeyOf<T>, value: any) => any): void;
    onBlur?(event: React.FocusEvent<any> | undefined, value: (DeepTypeOf<T, K> & V) | undefined, change: (key: DeepKeyOf<T>, value: any) => any): void;
    onFocus?(event: React.FocusEvent<any> | undefined, name?: string): void;
}
export interface IFormFieldInternal<T, K extends DeepKeyOf<T>, P, V = any> extends IFormFieldPublicProps<T, K, P, V>, IFormFieldInternalProps<T> {
}
export declare type IExternalFormField<T, K extends DeepKeyOf<T>, V = any, P = any> = Omit<IFormFieldPublicProps<T, K, P, V>, 'component'>;
interface IFormFieldState {
    validate?: Array<Validator.Validator<any, any, any>>;
}
export declare class FormFieldInternal<T, K extends DeepKeyOf<T>, P = any, V = any> extends React.PureComponent<IFormFieldInternal<T, K, P, V>, IFormFieldState> {
    static defaultProps: Partial<IFormFieldInternal<any, any, any>>;
    state: {
        validate: import("../validation/interfaces").Validator<any, any, any>[] | import("../validation/interfaces").Validator<DeepTypeOf<T, K> & V, T, P>[] | undefined;
    };
    private onBlurNormalizeTimeout;
    componentDidMount(): void;
    componentWillUnmount(): void;
    componentDidUpdate(prevProps: IFormFieldInternal<T, K, P>): void;
    render(): JSX.Element;
    private onChange;
    private onBlur;
    private isRequired;
    private getStringifiedName;
    private getNameWithSection;
    private change;
    private changeInForm;
}
export declare function FormField<T, K extends DeepKeyOf<T>, P = any, V = any>(props: IFormFieldPublicProps<T, K, P, V>): JSX.Element | null;
export {};
