"use strict";

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

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

var _avatar = _interopRequireDefault(require("../../avatar"));

var _openData = require("../../../utils/open-data");

var _getLocale = require("../../../utils/getLocale");

require("./index.css");

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

function Card(_ref) {
  var data = _ref.data;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "okr-share-card pink-card"
  }, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
    size: {
      width: 42,
      textNum: 1,
      fontSize: 14
    },
    style: {
      flexShrink: 0
    },
    name: data.user.name,
    userId: data.user.userId,
    color: data.user.avatar.color,
    src: data.user.avatar.src
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "okr-share-card-user__name"
  }, /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
    name: data.user.name,
    id: data.user.userId
  }), "\u7684"), (0, _getLocale.getLocale)('Menu_Title_OKRs')), /*#__PURE__*/_react["default"].createElement("div", {
    className: "okr-share-card-user__dept"
  }, /*#__PURE__*/_react["default"].createElement(_openData.OpenDepartmentName, {
    name: data.user.departmentName,
    id: data.user.departmentId
  })), /*#__PURE__*/_react["default"].createElement("div", {
    className: "card-okr__content"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "card-okr__name"
  }, (0, _openData.parseString)(data.okrName)), data.krs.map(function (kr) {
    return /*#__PURE__*/_react["default"].createElement("div", {
      className: "card-kr__item"
    }, (0, _openData.parseString)(kr));
  })));
}

var _default = Card;
exports["default"] = _default;