"use strict";

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

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

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

var _popup = _interopRequireDefault(require("../../../popup"));

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

var _bsGlobal = require("../../../../utils/bs-global");

var _ownMenu = _interopRequireDefault(require("./components/own-menu"));

var _constant = require("../../constant");

require("./index.css");

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

var _getUserInfo = (0, _bsGlobal.getUserInfo)(),
    Id = _getUserInfo.Id,
    Name = _getUserInfo.Name,
    UserAvatar = _getUserInfo.UserAvatar;

var preCls = "tita-ui-nav-top-user-own-menu";

function UserOwnMenu() {
  return /*#__PURE__*/_react["default"].createElement(_popup["default"], {
    popup: /*#__PURE__*/_react["default"].createElement(_ownMenu["default"], null),
    popupAlign: _constant.popupAlignPhoto,
    popupTransitionName: (0, _classnames["default"])("".concat(preCls, "__popup-right-top")),
    destroyPopupOnHide: false
  }, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
    userId: Id,
    name: Name,
    color: UserAvatar.Color,
    src: UserAvatar.Medium
  }));
}

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