Liferay.Loader.define("layout-content-page-editor-web@2.0.166/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 };
    }

    /**
     * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
     * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
     */
    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