export const connectorOptions = ref([
  { value: 'and', label: '且' },
  { value: 'or', label: '或' }
]);


export const OperatorOptions = ref([
  { value: '=', tag: '=', label: '等于' },
  { value: '<>', tag: '!=', label: '不等于' },
  { value: 'in', tag: 'in(...)', label: '等于任意一个' },
  { value: 'notIn', tag: 'not in (...)', label: '不等于任意一个' },
  { value: '>', tag: '>', label: '大于' },
  { value: '>=', tag: '>=', label: '大于等于' },
  { value: '<', tag: '<', label: '小于' },
  { value: '<=', tag: '<=', label: '小于等于' },
  { value: 'between', tag: 'between(...)', label: '介于范围' },
  { value: 'not between', tag: 'not between(...)', label: '介于范围外' },
  { value: 'not null', tag: 'not null', label: '不为空' },
  { value: 'is null', tag: 'is null', label: '为空' },
  { value: 'is true', tag: 'is true', label: '为真' },
  { value: 'is false', tag: 'is false', label: '为假' }
]);

export const DataTypeOptions = ref([
  { value: 'fixed', label: '固定值' },
  { value: 'variable', label: '变量' }
]);

export const nodeResualtOptions = ref([
  { value: 'true', label: '通过' },
  { value: 'false', label: '不通过' }
]);

// 定义常用计算符
export const operators = ref([
  { id: 'plus', label: '+', category: 'operator', type: 'success', tooltip: '加' },
  { id: 'minus', label: '-', category: 'operator', type: 'success', tooltip: '减' },
  { id: 'multiply', label: '*', category: 'operator', type: 'success', tooltip: '乘' },
  { id: 'divide', label: '/', category: 'operator', type: 'success', tooltip: '除' },
  { id: 'openParen', label: '(', category: 'operator', type: 'success', tooltip: '左括号' },
  { id: 'closeParen', label: ')', category: 'operator', type: 'success', tooltip: '右括号' },
  { id: 'power', label: '^', category: 'operator', type: 'success', tooltip: '乘方' }, // 乘方
  { id: 'modulus', label: '%', category: 'operator', type: 'success', tooltip: '取余' }, // 取余
  { id: 'separator', label: ',', category: 'separator', type: 'success', tooltip: '分隔符' }
]);

// 定义常用公式
export const commonFormulas = ref([
  { id: 'sum', label: 'SUM', fieldName: 'sum', tooltip: '求和:sum(变量1, 变量2, ...)', category: 'formula', type: 'info' },
  { id: 'MEAN', label: 'MEAN', fieldName: 'mean', tooltip: '平均数:mean(变量1, 变量2, ...)', category: 'formula', type: 'info' },
  { id: 'max', label: 'MAX', fieldName: 'max', tooltip: '最大值:max(变量1, 变量2, ...)', category: 'formula', type: 'info' },
  { id: 'min', label: 'MIN', fieldName: 'min', tooltip: '最小值:min(变量1, 变量2, ...)', category: 'formula', type: 'info' },
  { id: 'abs', label: 'ABS', fieldName: 'abs', tooltip: '绝对数:abs(变量)', category: 'formula', type: 'info' },
  { id: 'round', label: 'ROUND', fieldName: 'round', tooltip: '舍入:round(变量, 小数位数)', category: 'formula', type: 'info' }
]);
