import React from 'react';
import "./index.less";
var tagObj = {
  running: {
    borderColor: 'rgba(77,144,254,0.12)',
    backgroundColor: 'rgba(77,144,254,0.12)',
    color: 'rgba(77,144,254,1)',
    text: '执行中'
  },
  success: {
    borderColor: 'rgba(0,191,165,.12)',
    backgroundColor: 'rgba(0,191,165,.12)',
    color: 'rgba(0,191,165,1)',
    text: '成功'
  },
  failed: {
    borderColor: 'rgba(247,122,112,.12)',
    backgroundColor: 'rgba(247,122,112,.12)',
    color: 'rgba(247,122,112,1)',
    text: '失败'
  },
  pending: {
    borderColor: 'rgba(255,177,0,.12)',
    backgroundColor: 'rgba(255,177,0,.12)',
    color: 'rgba(255,177,0,1)',
    text: '准备中'
  },
  skipped: {
    borderColor: 'rgba(216,216,216,.12)',
    backgroundColor: 'rgba(216,216,216,.12)',
    color: 'rgba(216,216,216,1)',
    text: '已跳过'
  },
  canceled: {
    borderColor: 'rgba(216,216,216,.12)',
    backgroundColor: 'rgba(216,216,216,.12)',
    color: 'rgba(216,216,216,1)',
    text: '已取消'
  },
  created: {
    borderColor: 'rgba(216,216,216,.12)',
    backgroundColor: 'rgba(216,216,216,.12)',
    color: 'rgba(216,216,216,1)',
    text: '未执行'
  },
  not_audit: {
    borderColor: 'rgba(255, 177, 0,.12)',
    backgroundColor: 'rgba(255, 177, 0,.12)',
    color: 'rgba(255, 177, 0,1)',
    text: '待审核'
  },
  stop: {
    borderColor: 'rgba(255, 112, 67, .12)',
    backgroundColor: 'rgba(255, 112, 67, .12)',
    color: 'rgba(255, 112, 67, 1)',
    text: '已终止'
  }
};

var renderTag = function renderTag(_ref) {
  var status = _ref.status,
      size = _ref.size,
      className = _ref.className;

  var _ref2 = tagObj[status] || {},
      borderColor = _ref2.borderColor,
      backgroundColor = _ref2.backgroundColor,
      color = _ref2.color,
      text = _ref2.text;

  return tagObj[status] ? /*#__PURE__*/React.createElement("span", {
    className: "".concat(className, " c7ncd-pipelineManage-optsDetail-header-tag"),
    style: {
      borderColor: borderColor,
      backgroundColor: backgroundColor,
      color: color,
      fontSize: "".concat(size, "px")
    }
  }, text) : null;
};

renderTag.defaultProps = {
  size: 12,
  className: ''
};
export default renderTag;