Liferay.Loader.define("commerce-frontend-js@3.0.26/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 };
    }

    /**
     * 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 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