"use strict";

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

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

var _classnames = _interopRequireDefault(require("classnames"));

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

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

var _precls = _interopRequireDefault(require("../../precls"));

require("./index.css");

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

function _default(props) {
  var user = props.data,
      _props$level = props.level,
      level = _props$level === void 0 ? 0 : _props$level;
  return /*#__PURE__*/_react["default"].createElement("div", {
    title: "",
    className: (0, _classnames["default"])("".concat(_precls["default"], "__user-node")),
    style: {
      paddingLeft: 12 + level * 10
    }
  }, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
    user: user
  }), /*#__PURE__*/_react["default"].createElement("span", {
    style: {
      width: "calc(100% - ".concat(12 + 13 + 16 + level * 10, "px)")
    },
    className: (0, _classnames["default"])("".concat(_precls["default"], "__user-node-username"), "noselect")
  }, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
    name: user.name,
    id: user.userId,
    type: 'userName'
  })));
}