'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.UserMenuLink = exports.LogoutLink = exports.UserIcon = undefined;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _Link = require('./Link');

var _Icons = require('./Icons');

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

var UserIcon = exports.UserIcon = function UserIcon(_ref) {
  var firstInitial = _ref.firstInitial,
      lastInitial = _ref.lastInitial,
      color = _ref.color;
  return _react2.default.createElement(
    'div',
    { className: 'vs-user-icon-circle' },
    _react2.default.createElement(
      'span',
      { className: 'vs-user-icon-first' },
      firstInitial
    ),
    _react2.default.createElement(
      'span',
      { className: 'vs-user-icon-last' },
      lastInitial
    )
  );
}; /** @prettier */
var LogoutLink = exports.LogoutLink = function LogoutLink(_ref2) {
  var onLogout = _ref2.onLogout,
      label = _ref2.label;

  return _react2.default.createElement(
    _Link.Link,
    null,
    _react2.default.createElement(
      'a',
      { onClick: onLogout },
      _react2.default.createElement(_Link.LinkContentWrapper, { icon: _react2.default.createElement(_Icons.LogoutIcon, null), label: label || 'Logout' })
    )
  );
};

var UserMenuLink = exports.UserMenuLink = function UserMenuLink(_ref3) {
  var onClicked = _ref3.onClicked,
      linkIcon = _ref3.linkIcon,
      linkLabel = _ref3.linkLabel;

  return _react2.default.createElement(
    _Link.Link,
    null,
    _react2.default.createElement(
      'a',
      { onClick: onClicked },
      _react2.default.createElement(_Link.LinkContentWrapper, { icon: linkIcon, label: linkLabel })
    )
  );
};