Liferay.Loader.define("commerce-frontend-taglib@10.1.16/products_compare/ProductsCompareItem.soy", ['module', 'exports', 'require', 'frontend-js-metal-web$metal-component', 'frontend-js-metal-web$metal-soy'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = exports.templates = exports.ProductsCompareItem = void 0;

    var _metalComponent = _interopRequireDefault(require("frontend-js-metal-web$metal-component"));

    var _metalSoy = _interopRequireDefault(require("frontend-js-metal-web$metal-soy"));

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

    function _typeof(obj) {
      "@babel/helpers - typeof";
      if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
        _typeof = function _typeof(obj) {
          return typeof obj;
        };
      } else {
        _typeof = function _typeof(obj) {
          return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
        };
      }return _typeof(obj);
    }

    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }

    function _possibleConstructorReturn(self, call) {
      if (call && (_typeof(call) === "object" || typeof call === "function")) {
        return call;
      }return _assertThisInitialized(self);
    }

    function _assertThisInitialized(self) {
      if (self === void 0) {
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
      }return self;
    }

    function _getPrototypeOf(o) {
      _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
        return o.__proto__ || Object.getPrototypeOf(o);
      };return _getPrototypeOf(o);
    }

    function _inherits(subClass, superClass) {
      if (typeof superClass !== "function" && superClass !== null) {
        throw new TypeError("Super expression must either be null or a function");
      }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });if (superClass) _setPrototypeOf(subClass, superClass);
    }

    function _setPrototypeOf(o, p) {
      _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
        o.__proto__ = p;return o;
      };return _setPrototypeOf(o, p);
    }

    var templates;
    exports.templates = templates;
    goog.loadModule(function (exports) {
      var soy = goog.require('soy');

      goog.require('soydata');

      // This file was automatically generated from ProductsCompareItem.soy.
      // Please don't edit this file by hand.

      /**
       * @fileoverview Templates in namespace ProductsCompareItem.
       * @public
       */

      goog.module('ProductsCompareItem.incrementaldom');

      goog.require('goog.soy.data.SanitizedContent');

      var incrementalDom = goog.require('incrementaldom');

      goog.require('soy.asserts');

      goog.require('soy.idom');

      var $templateAlias1 = _metalSoy.default.getTemplate('ClayIcon.incrementaldom', 'render');
      /**
       * @param {{
       *  id: (!goog.soy.data.SanitizedContent|null|number|string|undefined),
       *  thumbnail: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  visibility: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  _handleRemoveProduct: (*|null|undefined)
       * }} opt_data
       * @param {Object<string, *>=} opt_ijData
       * @param {Object<string, *>=} opt_ijData_deprecated
       * @return {void}
       * @suppress {checkTypes}
       */

      function $render(opt_data, opt_ijData, opt_ijData_deprecated) {
        opt_ijData = opt_ijData_deprecated || opt_ijData;
        opt_data = opt_data || {};
        /** @type {!goog.soy.data.SanitizedContent|null|number|string|undefined} */

        var id = soy.asserts.assertType(opt_data.id == null || goog.isNumber(opt_data.id) || goog.isString(opt_data.id) || opt_data.id instanceof goog.soy.data.SanitizedContent, 'id', opt_data.id, '!goog.soy.data.SanitizedContent|null|number|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */

        var thumbnail = soy.asserts.assertType(opt_data.thumbnail == null || goog.isString(opt_data.thumbnail) || opt_data.thumbnail instanceof goog.soy.data.SanitizedContent, 'thumbnail', opt_data.thumbnail, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */

        var visibility = soy.asserts.assertType(opt_data.visibility == null || goog.isString(opt_data.visibility) || opt_data.visibility instanceof goog.soy.data.SanitizedContent, 'visibility', opt_data.visibility, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */

        var spritemap = soy.asserts.assertType(opt_data.spritemap == null || goog.isString(opt_data.spritemap) || opt_data.spritemap instanceof goog.soy.data.SanitizedContent, 'spritemap', opt_data.spritemap, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {*|null|undefined} */

        var _handleRemoveProduct = opt_data._handleRemoveProduct;
        var visibilityClass__soy3511 = '';
        visibilityClass__soy3511 += visibility != null ? visibility : 'hidden';
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'minium-products-compare__item minium-products-compare__item--' + visibilityClass__soy3511);
        incrementalDom.elementOpenEnd();

        if (id != null) {
          incrementalDom.elementOpenStart('div');
          incrementalDom.attr('class', 'minium-products-compare__thumbnail minium-products-compare__thumbnail--' + visibilityClass__soy3511);
          incrementalDom.attr('style', 'background-image: url(\'' + thumbnail + '\')');
          incrementalDom.elementOpenEnd();
          incrementalDom.elementClose('div');

          if (spritemap != null) {
            incrementalDom.elementOpenStart('span');
            incrementalDom.attr('class', 'minium-products-compare__delete minium-products-compare__delete--' + visibilityClass__soy3511);
            incrementalDom.attr('data-onclick', _handleRemoveProduct);
            incrementalDom.elementOpenEnd();
            $templateAlias1({
              spritemap: spritemap,
              symbol: 'times'
            }, null, opt_ijData);
            incrementalDom.elementClose('span');
          }
        }

        incrementalDom.elementClose('div');
      }

      exports.render = $render;
      /**
       * @typedef {{
       *  id: (!goog.soy.data.SanitizedContent|null|number|string|undefined),
       *  thumbnail: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  visibility: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  spritemap: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  _handleRemoveProduct: (*|null|undefined)
       * }}
       */

      $render.Params;

      if (goog.DEBUG) {
        $render.soyTemplateName = 'ProductsCompareItem.render';
      }

      exports.render.params = ["id", "thumbnail", "visibility", "spritemap", "_handleRemoveProduct"];
      exports.render.types = {
        "id": "string|number",
        "thumbnail": "string",
        "visibility": "string",
        "spritemap": "string",
        "_handleRemoveProduct": "any"
      };
      exports.templates = templates = exports;
      return exports;
    });

    var ProductsCompareItem = /*#__PURE__*/function (_Component) {
      _inherits(ProductsCompareItem, _Component);

      function ProductsCompareItem() {
        _classCallCheck(this, ProductsCompareItem);

        return _possibleConstructorReturn(this, _getPrototypeOf(ProductsCompareItem).apply(this, arguments));
      }

      return ProductsCompareItem;
    }(_metalComponent.default);

    exports.ProductsCompareItem = ProductsCompareItem;

    _metalSoy.default.register(ProductsCompareItem, templates);

    var _default = templates;
    /* jshint ignore:end */

    exports.default = _default;
    //# sourceMappingURL=ProductsCompareItem.soy.js.map
  }
});
//# sourceMappingURL=ProductsCompareItem.soy.js.map