"use strict";
const isEmpty = function(obj) {
  if (obj == null)
    return true;
  if (typeof obj !== "object")
    return false;
  return JSON.stringify(obj) === "{}";
};
const status = function(value, state) {
  var status2 = "未生成";
  if (state == "SUCCESS") {
    switch (value) {
      case "NONE":
        status2 = "未生成";
        break;
      case "PENDING":
        status2 = "等待";
        break;
      case "GENERATING":
        status2 = "生成中...";
        break;
      case "SUCCESS":
        status2 = "生成成功";
        break;
      case "FAILED":
        status2 = "生成失败";
        break;
    }
  } else {
    switch (state) {
      case "FAILED":
        status2 = "生成失败";
        break;
      case "GENERATING":
        status2 = "生成中...";
        break;
      case "NONE":
        status2 = "未生成";
        break;
    }
  }
  return status2;
};
const orderStatus = function(value) {
  var statusStr = "已完成";
  switch (value) {
    case "PENDING":
      statusStr = "等待";
      break;
    case "COMPLETE":
      statusStr = "已完成";
      break;
    case "FULL_REFUND":
      statusStr = "全额退款";
      break;
    case "CORRECTION1_REFUND":
      statusStr = "补正1次退款";
      break;
    case "CORRECTION2_REFUND":
      statusStr = "补正2次退款";
      break;
  }
  return statusStr;
};
const proType = function(value) {
  var str = "项目创建";
  switch (value) {
    case "PROJ":
      str = "项目创建";
      break;
    case "AGENT":
      str = "代理";
      break;
    case "FULL_REFUND":
      str = "全额退款";
      break;
    case "CORRECTION1_REFUND":
      str = "补正1次退款";
      break;
    case "CORRECTION2_REFUND":
      str = "补正2次退款";
      break;
  }
  return str;
};
const boderStyle = function(value) {
  var str = "tickets-yellow";
  switch (value) {
    case "1":
      str = "tickets-yellow";
      break;
    case "2":
      str = "tickets-gray";
      break;
    case "3":
      str = "tickets-green";
      break;
  }
  return str;
};
const fontColor = function(value) {
  var str = "font-yellow";
  switch (value) {
    case "1":
      str = "font-yellow";
      break;
    case "2":
      str = "font-gray";
      break;
    case "3":
      str = "font-green";
      break;
  }
  return str;
};
const timeSplit = function(value) {
  var regex = new RegExp("-", "g");
  return value.replace(regex, ".");
};
const objIsEmpty = function(obj) {
  if (obj === void 0) {
    return true;
  }
  if (obj === null) {
    return true;
  }
  return Object.keys(obj).length === 0;
};
var moneyTxt = function(size, fontSize, price) {
  const formattedStr = '<span style="font-size:' + size + 'px;">￥</span><span style="font-size:' + fontSize + 'px;">' + price + "</span>";
  return formattedStr;
};
var phoneNum = function(str, startLength, endLength, replaceStr) {
  if (str == null || str == "")
    return "";
  if (str.length <= startLength + endLength) {
    return str;
  }
  return str.slice(0, startLength) + replaceStr + str.slice(str.length - endLength);
};
var repairStatusColor = function(status2) {
  var color = "repair-status-yellow";
  switch (status2) {
    case "PENDING":
      color = "repair-status-yellow";
      break;
    case "APPROVED":
      color = "repair-status-green";
      break;
    case "REJECTED":
      color = "repair-status-red";
      break;
    case "CANCELED":
      color = "repair-status-gray";
      break;
  }
  return color;
};
var repairStatus = function(status2) {
  var str = "待审核";
  switch (status2) {
    case "PENDING":
      str = "待审核";
      break;
    case "APPROVED":
      str = "已通过";
      break;
    case "REJECTED":
      str = "未通过";
      break;
    case "CANCELED":
      str = "已取消";
      break;
  }
  return str;
};
var repairType = function(type) {
  var str = "未知";
  switch (type) {
    case "CORRECTION1":
      str = "一次补正";
      break;
    case "CORRECTION2":
      str = "二次补正";
      break;
  }
  return str;
};
var repairKind = function(kind) {
  var str = "未知";
  switch (kind) {
    case "CODE":
      str = "代码";
      break;
    case "MANUAL":
      str = "操作手册";
      break;
    case "ALL":
      str = "代码+操作手册";
      break;
  }
  return str;
};
var payType = function(type) {
  var typeStr = "支出";
  switch (type) {
    case 1:
      typeStr = "充值";
      break;
    case 2:
      typeStr = "支出";
      break;
    case 3:
      typeStr = "提现";
      break;
    case 4:
      typeStr = "系统\n扣款";
      break;
    case 5:
      typeStr = "订单\n收入";
      break;
    case 6:
      typeStr = "付款";
      break;
  }
  return typeStr;
};
var payTypeColor = function(type) {
  var typeColr = "type-g";
  switch (type) {
    case 1:
    case 3:
    case 5:
      typeColr = "type-g";
      break;
    case 2:
    case 4:
    case 6:
      typeColr = "type-z";
      break;
  }
  return typeColr;
};
var payTypeSign = function(type) {
  var typeStr = "-";
  switch (type) {
    case 1:
    case 5:
      typeStr = "+";
      break;
    case 2:
    case 3:
    case 4:
    case 6:
      typeStr = "-";
      break;
  }
  return typeStr;
};
var invoiceStatusColor = function(status2) {
  var str = "col-yellow";
  switch (status2) {
    case "-1":
      str = "col-gray";
      break;
    case "0":
      str = "col-red";
      break;
    case "1":
      str = "col-yellow";
      break;
    case "2":
      str = "col-green";
      break;
  }
  return str;
};
var invoiceStatus = function(status2) {
  var str = "待审核";
  switch (status2) {
    case "-1":
      str = "已取消";
      break;
    case "0":
      str = "未通过";
      break;
    case "1":
      str = "待审核";
      break;
    case "2":
      str = "完成";
      break;
  }
  return str;
};
var payWay = function(way) {
  var wayClass = "pay-wx";
  switch (way) {
    case "微信":
      wayClass = "pay-wx";
      break;
    case "支付宝":
      wayClass = "pay-alipay";
      break;
    case "对公转账":
      wayClass = "pay-public";
      break;
    case "百度":
      wayClass = "pay-bd";
      break;
  }
  return wayClass;
};
exports.boderStyle = boderStyle;
exports.fontColor = fontColor;
exports.invoiceStatus = invoiceStatus;
exports.invoiceStatusColor = invoiceStatusColor;
exports.isEmpty = isEmpty;
exports.moneyTxt = moneyTxt;
exports.objIsEmpty = objIsEmpty;
exports.orderStatus = orderStatus;
exports.payType = payType;
exports.payTypeColor = payTypeColor;
exports.payTypeSign = payTypeSign;
exports.payWay = payWay;
exports.phoneNum = phoneNum;
exports.proType = proType;
exports.repairKind = repairKind;
exports.repairStatus = repairStatus;
exports.repairStatusColor = repairStatusColor;
exports.repairType = repairType;
exports.status = status;
exports.timeSplit = timeSplit;
//# sourceMappingURL=../../../.sourcemap/mp-toutiao/common/js/conver.js.map
