"use strict";

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

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

var _propTypes = _interopRequireDefault(require("prop-types"));

var _reactRouterDom = require("react-router-dom");

var _reactIntl = require("react-intl");

var _UserMenu = _interopRequireDefault(require("../../../styles/cspace-ui/UserMenu.css"));

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

const messages = (0, _reactIntl.defineMessages)({
  logout: {
    "id": "userMenu.logout",
    "defaultMessage": "Sign out"
  }
});
const propTypes = {
  screenName: _propTypes.default.string.isRequired
};

function UserMenu(props) {
  const {
    screenName
  } = props;
  return /*#__PURE__*/_react.default.createElement("div", {
    className: _UserMenu.default.common
  }, screenName, ' ', "|", /*#__PURE__*/_react.default.createElement(_reactRouterDom.Link, {
    to: "/logout"
  }, /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, messages.logout)));
}

UserMenu.propTypes = propTypes;