Liferay.Loader.define("layout-content-page-editor-web@2.0.102/page_editor/common/components/UserIcon", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/icon', '@frontend-taglib-clay$clayui/sticker', 'frontend-js-react-web$prop-types', 'frontend-js-react-web$react'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = UserIcon;

    var _icon = _interopRequireDefault(require("@frontend-taglib-clay$clayui/icon"));

    var _sticker = _interopRequireDefault(require("@frontend-taglib-clay$clayui/sticker"));

    var _propTypes = _interopRequireDefault(require("frontend-js-react-web$prop-types"));

    var _react = _interopRequireDefault(require("frontend-js-react-web$react"));

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

    /**
     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
     *
     * This library is free software; you can redistribute it and/or modify it under
     * the terms of the GNU Lesser General Public License as published by the Free
     * Software Foundation; either version 2.1 of the License, or (at your option)
     * any later version.
     *
     * This library is distributed in the hope that it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
     * details.
     */
    function UserIcon(_ref) {
      var _ref$fullName = _ref.fullName,
          fullName = _ref$fullName === void 0 ? '' : _ref$fullName,
          _ref$portraitURL = _ref.portraitURL,
          portraitURL = _ref$portraitURL === void 0 ? '' : _ref$portraitURL,
          userId = _ref.userId;
      var stickerColor = parseInt(userId, 10) % 10;
      return (/*#__PURE__*/_react.default.createElement(_sticker.default, {
          className: "flex-shrink-0 sticker-use-icon user-icon-color-".concat(stickerColor),
          displayType: "secondary",
          shape: "circle",
          size: "lg"
        }, portraitURL ? /*#__PURE__*/_react.default.createElement("div", {
          className: "sticker-overlay"
        }, /*#__PURE__*/_react.default.createElement("img", {
          alt: "".concat(fullName, "."),
          className: "sticker-img",
          src: portraitURL
        })) : /*#__PURE__*/_react.default.createElement(_icon.default, {
          symbol: "user"
        }))
      );
    }
    //# sourceMappingURL=UserIcon.js.map
  }
});
//# sourceMappingURL=UserIcon.js.map