import React, { ReactElement } from 'react';
import { FormProps, useForm, FormProvider, Field, List } from 'rc-field-form';
import { Props as ShadowProps } from '../shadow';
import { FieldProps } from 'rc-field-form/es/Field';
import { Property } from 'csstype';
import { ViewProps } from 'remax/one';
import { RuleType, ValidatorRule, RuleRender, StoreValue, Meta, FormInstance, ValidateErrorEntity } from 'rc-field-form/es/interface';
export declare const FormStore: import("parsec-hooks/lib/createContainer").Container<Props<any> & {
    errorFields: ValidateErrorEntity['errorFields'];
    setErrorFields: (errorFields: ValidateErrorEntity['errorFields']) => void;
}, unknown>;
interface BaseRule {
    enum?: StoreValue[];
    len?: number;
    max?: number;
    message?: string | ReactElement;
    min?: number;
    pattern?: RegExp;
    required?: boolean;
    transform?: (value: StoreValue) => StoreValue;
    type?: RuleType | 'phone' | 'idCard' | 'password';
    whitespace?: boolean;
    /** Customize rule level `validateTrigger`. Must be subset of Field `validateTrigger` */
    validateTrigger?: string | string[];
}
declare type AggregationRule = BaseRule & Partial<ValidatorRule>;
interface ArrayRule extends Omit<AggregationRule, 'type'> {
    type: 'array';
    defaultField?: RuleObject;
}
export declare type RuleObject = AggregationRule | ArrayRule;
export declare type Rule = RuleObject | RuleRender;
interface BaseItemProps {
    style?: React.CSSProperties;
    /**
     * 校验规则
     */
    rules?: Rule[];
    label?: React.ReactNode;
    /**
     * 后面的节点
     */
    after?: React.ReactNode;
    className?: string;
    /**
     * 是否垂直
     */
    vertical?: boolean;
    /**
     * 显示必填*号
     * @default true
     */
    requiredMark?: boolean;
    /**
     * 只读模式
     */
    readOnly?: boolean;
    /**
     * 不需要样式
     */
    noStyle?: boolean;
    /**
     * label类名
     */
    labelCls?: string;
    /**
     * label样式
     */
    labelStyle?: React.CSSProperties;
    /**
     * 子元素类别
     */
    childrenCls?: string;
    /**
     * 必填标记类名
     */
    requiredMarkCls?: string;
    afterCls?: string;
    /**
     * 字符串的label，用于提示
     * @default label
     */
    strLabel?: string;
    /**
     * label的对齐
     * @default right
     */
    labelJustify?: Property.TextAlign;
    /**
     * children的对齐
     * @default right
     */
    childrenAlign?: Property.TextAlign;
    cell?: boolean;
    /**
     * 显示冒号
     */
    colon?: React.ReactNode;
    /**
     * label的宽度，建议使用em单位
     */
    labelWidth?: number | string;
    /**
     * 渲染只读时的值
     */
    renderReadOnlyValue?: (value: any, values: any) => React.ReactNode;
    /**
     * 适老模式，开启后尺寸会变大
     */
    elderly?: boolean;
}
export interface ItemProps<Values = {}> extends Omit<FieldProps, 'rules' | 'children'>, BaseItemProps, ViewProps {
    children?: React.ReactNode | ((control: any, meta: Meta, form: FormInstance<Values>) => React.ReactNode);
}
export interface Props<Values extends unknown = any> extends Pick<FormProps<Values>, 'initialValues' | 'form' | 'onValuesChange' | 'onFinishFailed' | 'children' | 'onFinish'>, Omit<Pick<ItemProps<Values>, keyof BaseItemProps>, 'strLabel' | 'label' | 'renderReadOnlyValue'> {
    /**
     * 子项的类名
     */
    itemCls?: string;
    /**
     * 子项的样式
     */
    itemStyle?: React.CSSProperties;
    /**
     * 子项children的样式
     */
    itemChildrenStyle?: React.CSSProperties;
    /**
     * 卡片模式
     * @default true
     */
    card?: boolean;
    /**
     * shadow组件的props
     */
    shadowProps?: Omit<ShadowProps, 'children'> | false;
    /**
     * 绑定的数据
     */
    values?: Values;
}
declare const ReForm: (props: Props<{}>) => JSX.Element;
declare const Form: typeof ReForm & {
    useForm: typeof useForm;
    FormProvider: typeof FormProvider;
    Field: typeof Field;
    List: typeof List;
};
export default Form;
