"use strict";

Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.bizs = void 0, exports.enums2array = enums2array, exports.stringUtil = stringUtil;

var bizs = {
  controlDevice: "控制设备",
  transDevice: "传输设备",
  sensorDevice: "传感设备",
  otherDevice: "其他",
  float: "浮点型",
  int: "整型",
  boolean: "布尔型",
  enum: "枚举",
  string: "字符串",
  password: "密码",
  variable: "变量",
  constant: "常量",
  label: "标签",
  output: "输出",
  capacityCollect: "采集",
  capacityControl: "控制",
  capacityDiagnosis: "诊断",
  up: "上行",
  down: "下行"
};

function stringUtil(e, t) {
  var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : bizs, i = e.get(t);
  return i && i.key ? r[i.key] : "";
}

function enums2array(e) {
  var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : bizs, r = [];
  return e.enums.forEach((function(e) {
    r.push({
      key: e.value,
      value: e.key,
      label: t[e.key]
    });
  })), r;
}

exports.bizs = bizs;