import React from 'react';
import { IFormItemStore } from '../../store/form';
import { RendererProps, TestFunc, RendererConfig } from '../../factory';
export interface FormItemBasicConfig extends Partial<RendererConfig> {
    type?: string;
    wrap?: boolean;
    renderLabel?: boolean;
    renderDescription?: boolean;
    test?: RegExp | TestFunc;
    storeType?: string;
    validations?: string;
    strictMode?: boolean;
    descriptionClassName?: string;
    storeExtendsData?: boolean;
    sizeMutable?: boolean;
    weight?: number;
    extendsData?: boolean;
    validate?: (values: any, value: any) => string | boolean;
}
export interface FormControlProps extends RendererProps {
    error?: string;
    inputOnly?: boolean;
    errors?: {
        [propName: string]: string;
    };
    defaultValue: any;
    value: any;
    onChange: (value: any, submitOnChange?: boolean) => void;
    onBulkChange: (values: any, submitOnChange?: boolean) => void;
    prinstine: any;
    setPrinstineValue: (value: any) => void;
    formMode?: 'default' | 'inline' | 'horizontal' | 'row';
    formItem?: IFormItemStore;
    strictMode?: boolean;
    renderControl?: (props: RendererProps) => JSX.Element;
    renderLabel?: boolean;
    renderDescription?: boolean;
    sizeMutable?: boolean;
    wrap?: boolean;
    hint?: string;
    description?: string;
    descriptionClassName?: string;
}
export interface FormControlState {
    isFocused: boolean;
}
export declare type FormItemComponent = React.ComponentType<FormControlProps>;
export declare type FormControlComponent = React.ComponentType<FormControlProps>;
export interface FormItemConfig extends FormItemBasicConfig {
    component: FormControlComponent;
}
export declare class FormItemWrap extends React.Component<FormControlProps, FormControlState> {
    reaction: any;
    constructor(props: FormControlProps);
    componentWillMount(): void;
    componentWillUnmount(): void;
    handleFocus(e: any): void;
    handleBlur(e: any): void;
    renderControl(): JSX.Element | null;
    renderHorizontal(): JSX.Element;
    renderNormal(): JSX.Element;
    renderInline(): JSX.Element;
    renderRow(): JSX.Element;
    render(): JSX.Element | null;
}
export declare function registerFormItem(config: FormItemConfig): RendererConfig;
export declare function FormItem(config: FormItemBasicConfig): (component: React.ComponentType<FormControlProps>) => any;
export default FormItem;
