import { FIELD_TYPE } from '../domain/field/field-type';
import { FieldMeta } from '../capabilities/model-field-runtime';
/**
 * 使用场景
 */
export declare enum ExpressionModeEnum {
    SEARCH = 0,// 搜索条件
    FIELD_DISPLAY = 1,// 字段显示规则
    EXPORT_TEMPLATE = 2,// 导出模版
    DISPLAY_RULE = 3,// 显隐规则
    PROCESS_TITLE = 4,// 流程标题
    GATEWAY_RULE = 5,// 网关
    CREATE_FIELD = 6,// 创建字段
    PAAS_CREATE_FIELD = 7,// paas平台创建字段
    ENTITY_FORMULA = 8,// 实体-公式字段
    IPAAS_BACK = 9,// 用于 ipaas 后端计算用
    LABEL_PRINT = 10,// 标签打印文本字段配置
    NOCODE_BPMN_RULE = 11,// 无代码流程条件规则
    PAAS_BPMN_RULE = 12,// 低代码审批流
    ONLINE_FORM_FIELD_FORMULA = 13,// 电子表单字段公式
    MEDPRO_BUSINESSFLOW = 14,//medpro 业务流
    RUN_FORMULA = 15,//组件-公式计算字段字段
    BI_FORMULA = 16,// BI公式字段函数
    DATA_SET_FORMULA = 17,// 数据集公式字段函数
    EDHR_LABEL_PRINT = 18
}
export type ModeTabMapInterface = {
    [key in ExpressionModeEnum]: ExpressionTabEnum[];
};
export declare enum ExpressionTabEnum {
    FUNCTION = "function",// 函数
    FORM = "form",// 表单
    FIELD = "field",// 字段
    VARIABLE = "variable",// 变量
    NODE = "node",// 节点
    OPERATOR = "operator",// 运算符
    PARAMS = "params"
}
export declare enum OperatorTypeEnum {
    /**算术 */
    ARITHMETIC = "arithmetic",
    /**关系 */
    RELATIONSHIP = "relationship",
    /**逻辑 */
    LOGIC = "logic",
    /**其他 */
    OTHER = "other"
}
export declare enum VarTypeEnum {
    INNER_VAR = "INNER_VAR",
    SYSTEM_VAR = "SYSTEM_VAR",
    GLOBAL_VAR = "GLOBAL_VAR",
    PAGE_VAR = "PAGE_VAR"
}
export interface IdentifierItemInterface {
    id: string;
    name: string;
    desc?: string;
    valueType?: FIELD_TYPE | string;
    type?: FIELD_TYPE | string;
    _id_?: string;
    _name_?: string;
    _type_?: ExpressionTabEnum;
    _args_?: number;
}
export interface IdentifierGroupInterface {
    id: string;
    name: string;
    _id_?: string;
    _name_?: string;
    idToChildren?: boolean;
    children: IdentifierItemInterface[];
}
export type IdentifiersInterface = {
    [key in ExpressionTabEnum]?: Array<IdentifierGroupInterface | IdentifierItemInterface>;
};
export declare enum ReturnTypeEnum {
    String = "string",
    Number = "number",
    Boolen = "boolean"
}
export declare enum DataSetReturnTypeEnum {
    String = "string",
    Double = "number"
}
export declare enum EntityFormulaReturnTypeEnum {
    Text = "text",
    LongText = "long_text",
    Int = "integer",
    Long = "long",
    Double = "decimal",
    Boolen = "boolean"
}
interface CallbackOptions {
    expr: string;
    exprEcho: string;
    exprName?: string;
    returnType?: ReturnTypeEnum | EntityFormulaReturnTypeEnum;
    modelKey?: string;
    fieldProps?: {
        /**小数位数 */
        digits?: number;
        /**布尔值真 */
        trueText?: string;
        /**布尔值假 */
        falseText?: string;
    };
}
export interface ExpressionInterface {
    expr?: string;
    exprEcho?: string;
    exprName?: string;
    returnType?: ReturnTypeEnum | EntityFormulaReturnTypeEnum | DataSetReturnTypeEnum;
    disabledReturnType?: boolean;
    modalTitle?: string;
    mode: ExpressionModeEnum;
    identifiers: IdentifiersInterface;
    modelKey?: string;
    fieldProps?: {
        /**小数位数 */
        digits?: number;
        /**布尔值真 */
        trueText?: string;
        /**布尔值假 */
        falseText?: string;
    };
    callback?: (expr: string, exprEcho?: string, options?: CallbackOptions) => void;
    beforeClose?: (expr: string, exprEcho: string, returnType: string, formState: object) => Promise<boolean>;
}
export declare enum IdentifierAddon {
    Prefix = "\u200B",
    Suffix = "\u200B",
    ZeroWidth = "\u200B"
}
export interface FormulaModelInfo {
    modelKey: string;
    modelName: string;
    fieldList: FieldMeta[];
}
export {};
