Liferay.Loader.define("commerce-frontend-js@3.0.43/components/data_renderers/ImageRenderer", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/sticker', 'frontend-js-react-web$prop-types', 'frontend-js-react-web$react', '../../utilities/index'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = void 0;

    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"));

    var _index = require("../../utilities/index");

    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 ImageRenderer(props) {
      return (/*#__PURE__*/_react.default.createElement("div", {
          className: "row"
        }, /*#__PURE__*/_react.default.createElement("div", {
          className: "col-auto"
        }, typeof props.value === 'string' ? /*#__PURE__*/_react.default.createElement(_sticker.default, {
          shape: props.options.shape || 'rounded',
          size: props.options.size || 'xl'
        }, /*#__PURE__*/_react.default.createElement("div", {
          className: "sticker-overlay"
        }, /*#__PURE__*/_react.default.createElement("img", {
          alt: props.options.label || (props.options.labelKey ? (0, _index.getValueFromItem)(props.itemData, props.options.labelKey) : Liferay.Language.get('thumbnail')),
          className: "sticker-img",
          src: props.value
        }))) : /*#__PURE__*/_react.default.createElement(_sticker.default, {
          shape: props.options.shape || props.value.shape || 'rounded',
          size: props.options.size || props.value.size || 'xl'
        }, /*#__PURE__*/_react.default.createElement("div", {
          className: "sticker-overlay"
        }, /*#__PURE__*/_react.default.createElement("img", {
          alt: props.value.alt || Liferay.Language.get('thumbnail'),
          className: "sticker-img",
          src: props.value.src
        })))))
      );
    }

    var _default = ImageRenderer;
    exports.default = _default;
    //# sourceMappingURL=ImageRenderer.js.map
  }
});
//# sourceMappingURL=ImageRenderer.js.map