'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _reactRouter = require('react-router');

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 }; }

var messages = (0, _reactIntl.defineMessages)({
  logout: {
    'id': 'userMenu.logout',
    'defaultMessage': 'Sign out'
  }
});

function UserMenu(props) {
  var username = props.username;


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

UserMenu.propTypes = {
  username: _react.PropTypes.string.isRequired
};