import { PactDataType } from "lowcode/_setters/cDataSource-setter/type";
import { DataSourceType, RelationOptionType } from "../formKeyType";
import { RelationType } from "../treeDataRelationFn/type";
import { RequestParamMappingDataType } from "lowcode/_setters/cTreeDataRelation-setter/type";
export declare enum ConditionType {
    /**
     * 计算类型
     */
    computed = 0,
    /**
     * 隐藏
     */
    display = 1,
    /**
    * 以上全部
    */
    all = 2
}
export declare enum SelectRelateType {
    /**
     * 计算类型
     */
    computed = 0,
    /**
     * 且或拼接
     */
    addAndOr = 1,
    /**
     * 比较
     */
    compare = 2,
    /**
     * 以上全部
     */
    all = 3
}
/**
 * 解决表达式无法处理大数据计算
 * 将表达式转换成某个state.expression.xxx存储
 */
export interface ExpressionConfig {
    id: string;
    subscribe: string[];
    expression: string;
}
export interface SelectRelateOption {
    value: computedRelateType;
    label: string;
}
export type SelectRelateObj = {
    [key in SelectRelateType]: SelectRelateOption[];
};
export interface ResultRowListType extends RenderByFormKeyValueType {
    relate: computedRelateType;
    id: string;
}
export type ResultDataType = {
    isHandle: boolean;
    resultRowList: ResultRowListType[];
    [key: string]: any;
};
export interface ComputedRenderPropsValue {
    type: ConditionType;
    selectRelate: SelectRelateType;
    selectRowRelate: SelectRelateType;
    data: ComputedRenderPropsChildren[];
    resultData?: ResultDataType;
    isHideResult?: boolean;
    isDictionary?: boolean;
    [key: string]: any;
}
export interface ComputedRenderProps {
    value?: ComputedRenderPropsValue;
    field?: any;
    [key: string]: any;
}
export interface RowDataType {
    leftTree: RenderByFormKeyValueType;
    relate: computedRelateType;
    rightTree: RenderByFormKeyValueType;
}
export interface RenderByFormKeyValueType {
    formKey: DataSourceType;
    data: string | number | [string, string] | PactDataType | any;
    treeData: RelationType[];
}
export interface RenderByFormKey {
    relationOption: RelationOptionType[];
    value: RequestParamMappingDataType;
    onChange: Function;
}
export interface ComputedRenderPropsChildren {
    relate: computedRelateType;
    id: string;
    rowData: RowDataType;
    children: ComputedRenderPropsChildren[];
    [key: string]: any;
}
export declare enum computedRelateType {
    /**
     * 省略
     */
    omit = "omit",
    /**
     * 拼接
     */
    join = "join",
    /**
     * 加
     */
    add = "add",
    /**
     * 减
     */
    sub = "subtraction",
    /**
     * 乘
     */
    mul = "multiplication",
    /**
     * 除
     */
    div = "division",
    /**
     * 赋值
     */
    assign = "assign",
    /**
    * 且
    */
    and = "and",
    /**
     * 或
     */
    or = "or",
    /**
     * 相等
     */
    equality = "=",
    /**
     * 不相等
     */
    inequality = "!=",
    /**
     * 忽略大小写相等
     */
    ignoreCaseEquality = "~=",
    /**
     * 大于
     */
    greater = ">",
    /**
     * 小于
     */
    less = "<",
    /**
     * 大于等于
     */
    greaterEqu = ">=",
    /**
     * 小于等于
     */
    lessEqu = "<=",
    /**
     * 求模(取余)
     */
    modulo = "%"
}
