"use strict";

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

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

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

var _wifi = _interopRequireDefault(require("./img/wifi.svg"));

require("./index.css");

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

var preCls = "titaui-dynamic-interview";

function InterviewContent(_ref) {
  var data = _ref.data;
  var principalUser = data.principalUser,
      publishUser = data.publishUser,
      interviewName = data.interviewName,
      interviewId = data.interviewId;
  var _window$location = window.location,
      host = _window$location.host,
      pathname = _window$location.pathname;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(preCls, "__content")
  }, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
    name: publishUser.name,
    userId: publishUser.userId,
    color: publishUser.avatar.color,
    src: publishUser.avatar.medium,
    size: {
      width: 32,
      textNum: 1,
      fontSize: 12
    }
  }), /*#__PURE__*/_react["default"].createElement("img", {
    className: "".concat(preCls, "__wifi"),
    src: _wifi["default"],
    alt: "wifi"
  }), principalUser && /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
    name: principalUser.name,
    userId: principalUser.userId,
    color: principalUser.avatar.color,
    src: principalUser.avatar.medium,
    size: {
      width: 32,
      textNum: 1,
      fontSize: 12
    }
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(preCls, "__name")
  }, /*#__PURE__*/_react["default"].createElement("a", {
    href: "//".concat(host).concat(pathname, "#/interview?hideNavTop=true&reactRouterName=detail&recordId=").concat(interviewId, "&toUserId=").concat(principalUser.userId),
    target: "_blank",
    rel: "noreferrer"
  }, interviewName || "")));
}

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