"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = CompCard;

var _react = _interopRequireDefault(require("react"));

var _Iconfont = _interopRequireDefault(require("../../../../common/Iconfont"));

require("./index.less");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function CompCard(_a) {
  var label = _a.label,
      onAdd = _a.onAdd,
      type = _a.type,
      icon = _a.icon;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "compCard"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "comp-info"
  }, /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
    className: "comp-icon",
    type: icon
  }), /*#__PURE__*/_react["default"].createElement("span", {
    className: "comp-name"
  }, label)), /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
    className: "hover-icon",
    color: "#2F54EB",
    onClick: function onClick() {
      return onAdd({
        type: type,
        label: label,
        icon: icon
      });
    },
    type: "icon-add"
  })));
}