'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

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

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

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

var _UserMenu2 = _interopRequireDefault(_UserMenu);

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: _propTypes2.default.string.isRequired
};

function UserMenu(props) {
  const screenName = props.screenName;


  return _react2.default.createElement(
    'div',
    { className: _UserMenu2.default.common },
    screenName,
    ' | ',
    _react2.default.createElement(
      _reactRouterDom.Link,
      { to: '/logout' },
      _react2.default.createElement(_reactIntl.FormattedMessage, messages.logout)
    )
  );
}

UserMenu.propTypes = propTypes;