"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

exports.__esModule = true;
exports.User = void 0;

var _taggedTemplateLiteralLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteralLoose"));

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

var _styledComponents = _interopRequireDefault(require("styled-components"));

var _lib = require("@sentecacommerce-theme/lib");

var _Icons = require("../../../../Common/Icons");

var _templateObject, _templateObject2, _templateObject3;

var User = function User() {
  var _usersApi$useGet = _lib.usersApi.useGet(),
      data = _usersApi$useGet.data;

  var name = (data == null ? void 0 : data.firstName) || (data == null ? void 0 : data.email);
  return /*#__PURE__*/_react["default"].createElement(UserWrapper, null, /*#__PURE__*/_react["default"].createElement(IconContainer, null, /*#__PURE__*/_react["default"].createElement(_Icons.UserIcon, null)), /*#__PURE__*/_react["default"].createElement(Username, null, "Hi, ", name));
};

exports.User = User;

var UserWrapper = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2["default"])(["\n  width: 100%;\n  height: 100%;\n  display: flex;\n  align-items: center;\n"])));

var IconContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2["default"])(["\n  vertical-align: middle;\n  background: transparent;\n  flex: 0 0 auto;\n  color: rgba(0, 0, 0, 0.54);\n  text-align: center;\n  border-radius: 100px;\n  cursor: pointer;\n  display: inline-flex;\n  outline: none;\n  position: relative;\n  align-items: center;\n  margin-right: 12px;\n  margin-left: -3px;\n"])));

var Username = _styledComponents["default"].p(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteralLoose2["default"])(["\n  cursor: pointer;\n"])));
//# sourceMappingURL=index.js.map