Liferay.Loader.define("commerce-frontend-taglib@10.1.5/search_results/SearchResults.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.SearchResults = 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 SearchResults.soy.
      // Please don't edit this file by hand.

      /**
       * @fileoverview Templates in namespace SearchResults.
       * @hassoydeltemplate {SearchResults.Item.idom}
       * @hassoydelcall {SearchResults.Item.idom}
       * @public
       */

      goog.module('SearchResults.incrementaldom');

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

      goog.require('goog.string');

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

      goog.require('soy');

      goog.require('soy.asserts');

      var soyIdom = goog.require('soy.idom');

      var $templateAlias1 = _metalSoy.default.getTemplate('ClayIcon.incrementaldom', 'render');
      /**
       * @param {{
       *  queryValue: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  results: (?),
       *  visible: boolean,
       *  spritemap: (!goog.soy.data.SanitizedContent|string),
       *  loading: (boolean|null|undefined),
       *  _handleClick: (?)
       * }} 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;
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */

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

        var results = opt_data.results;
        /** @type {boolean} */

        var visible = soy.asserts.assertType(goog.isBoolean(opt_data.visible) || opt_data.visible === 1 || opt_data.visible === 0, 'visible', opt_data.visible, 'boolean');
        /** @type {!goog.soy.data.SanitizedContent|string} */

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

        var loading = soy.asserts.assertType(opt_data.loading == null || goog.isBoolean(opt_data.loading) || opt_data.loading === 1 || opt_data.loading === 0, 'loading', opt_data.loading, 'boolean|null|undefined');
        /** @type {?} */

        var _handleClick = opt_data._handleClick;

        if (visible) {
          incrementalDom.elementOpenStart('div');
          incrementalDom.attr('class', 'commerce-suggestions ' + (loading ? 'is-loading' : ''));
          incrementalDom.elementOpenEnd();
          incrementalDom.elementOpenStart('div');
          incrementalDom.attr('class', 'commerce-suggestions__wrapper');
          incrementalDom.elementOpenEnd();
          var item3830List = results;
          var item3830ListLen = item3830List.length;

          for (var item3830Index = 0; item3830Index < item3830ListLen; item3830Index++) {
            var item3830Data = item3830List[item3830Index];
            soy.$$getDelegateFn(soy.$$getDelTemplateId('SearchResults.Item.idom'), item3830Data.type, false)({
              queryValue: queryValue,
              item: item3830Data,
              spritemap: spritemap,
              _handleClick: _handleClick
            }, null, opt_ijData);
          }

          incrementalDom.elementClose('div');
          incrementalDom.elementOpenStart('div');
          incrementalDom.attr('class', 'commerce-suggestions__hints');
          incrementalDom.elementOpenEnd();
          $templateAlias1({
            spritemap: spritemap,
            symbol: 'order-arrows'
          }, null, opt_ijData);
          incrementalDom.elementOpen('span');
          /** @desc to navigate */

          var MSG_EXTERNAL_4610335530272359070 = Liferay.Language.get('to-navigate');
          incrementalDom.text(goog.string.unescapeEntities(MSG_EXTERNAL_4610335530272359070));
          incrementalDom.elementClose('span');
          $templateAlias1({
            spritemap: spritemap,
            symbol: 'enter'
          }, null, opt_ijData);
          incrementalDom.elementOpen('span');
          /** @desc to select */

          var MSG_EXTERNAL_2421364395347913222 = Liferay.Language.get('to-select');
          incrementalDom.text(goog.string.unescapeEntities(MSG_EXTERNAL_2421364395347913222));
          incrementalDom.elementClose('span');
          $templateAlias1({
            spritemap: spritemap,
            symbol: 'esc'
          }, null, opt_ijData);
          incrementalDom.elementOpen('span');
          /** @desc to dismiss */

          var MSG_EXTERNAL_8537346723041774508 = Liferay.Language.get('to-dismiss');
          incrementalDom.text(goog.string.unescapeEntities(MSG_EXTERNAL_8537346723041774508));
          incrementalDom.elementClose('span');
          incrementalDom.elementClose('div');
          incrementalDom.elementClose('div');
        }
      }

      exports.render = $render;
      /**
       * @typedef {{
       *  queryValue: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  results: (?),
       *  visible: boolean,
       *  spritemap: (!goog.soy.data.SanitizedContent|string),
       *  loading: (boolean|null|undefined),
       *  _handleClick: (?)
       * }}
       */

      $render.Params;

      if (goog.DEBUG) {
        $render.soyTemplateName = 'SearchResults.render';
      }
      /**
       * @param {{
       *  queryValue: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  item: (?),
       *  spritemap: (!goog.soy.data.SanitizedContent|string),
       *  _handleClick: (?)
       * }} opt_data
       * @param {Object<string, *>=} opt_ijData
       * @param {Object<string, *>=} opt_ijData_deprecated
       * @return {void}
       * @suppress {checkTypes}
       */

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

        soy.asserts.assertType(opt_data.queryValue == null || goog.isString(opt_data.queryValue) || opt_data.queryValue instanceof goog.soy.data.SanitizedContent, 'queryValue', opt_data.queryValue, '!goog.soy.data.SanitizedContent|null|string|undefined');

        /** @type {?} */

        var item = opt_data.item;
        /** @type {!goog.soy.data.SanitizedContent|string} */

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

        var _handleClick = opt_data._handleClick;
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'commerce-suggestions__item ' + (item.selected ? 'is-selected' : ''));
        incrementalDom.attr('onclick', _handleClick);
        incrementalDom.attr('data-onmouseenter', 'handleMouseEnter');
        incrementalDom.attr('data-onmouseleave', 'handleMouseLeave');
        incrementalDom.attr('data-pos', item.pos);

        if (item.selected) {
          incrementalDom.attr('ref', 'selected');
        }

        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'commerce-item commerce-item--search');
        incrementalDom.elementOpenEnd();

        if (item.image) {
          incrementalDom.elementOpenStart('img');
          incrementalDom.attr('alt', item.title);
          incrementalDom.attr('class', 'commerce-item__image');
          incrementalDom.attr('src', item.image);
          incrementalDom.elementOpenEnd();
          incrementalDom.elementClose('img');
        }

        if (item.icon) {
          incrementalDom.elementOpenStart('div');
          incrementalDom.attr('class', 'commerce-item__icon');
          incrementalDom.elementOpenEnd();
          $templateAlias1({
            spritemap: spritemap,
            symbol: item.icon
          }, null, opt_ijData);
          incrementalDom.elementClose('div');
        }

        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'commerce-item__content');
        incrementalDom.elementOpenEnd();
        soyIdom.print(item.title);
        incrementalDom.elementOpen('br');
        incrementalDom.elementClose('br');
        soyIdom.print(item.subtitle);
        incrementalDom.elementClose('div');
        incrementalDom.elementClose('div');
        incrementalDom.elementClose('div');
      }

      exports.__deltemplate_s3858_f689ae00 = __deltemplate_s3858_f689ae00;
      /**
       * @typedef {{
       *  queryValue: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  item: (?),
       *  spritemap: (!goog.soy.data.SanitizedContent|string),
       *  _handleClick: (?)
       * }}
       */

      __deltemplate_s3858_f689ae00.Params;

      if (goog.DEBUG) {
        __deltemplate_s3858_f689ae00.soyTemplateName = 'SearchResults.__deltemplate_s3858_f689ae00';
      }

      soy.$$registerDelegateFn(soy.$$getDelTemplateId('SearchResults.Item.idom'), '', 0, __deltemplate_s3858_f689ae00);
      /**
       * @param {{
       *  queryValue: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  item: (?),
       *  spritemap: (!goog.soy.data.SanitizedContent|string),
       *  _handleClick: (?)
       * }} opt_data
       * @param {Object<string, *>=} opt_ijData
       * @param {Object<string, *>=} opt_ijData_deprecated
       * @return {void}
       * @suppress {checkTypes}
       */

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

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

        var item = opt_data.item;
        /** @type {!goog.soy.data.SanitizedContent|string} */

        soy.asserts.assertType(goog.isString(opt_data.spritemap) || opt_data.spritemap instanceof goog.soy.data.SanitizedContent, 'spritemap', opt_data.spritemap, '!goog.soy.data.SanitizedContent|string');

        /** @type {?} */

        var _handleClick = opt_data._handleClick;
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'commerce-suggestions__item ' + (item.selected ? 'is-selected' : ''));
        incrementalDom.attr('onclick', _handleClick);
        incrementalDom.attr('data-onmouseenter', 'handleMouseEnter');
        incrementalDom.attr('data-onmouseleave', 'handleMouseLeave');
        incrementalDom.attr('data-pos', item.pos);

        if (item.selected) {
          incrementalDom.attr('ref', 'selected');
        }

        incrementalDom.elementOpenEnd();
        incrementalDom.text('Search "');
        soyIdom.print(queryValue);
        incrementalDom.text('" in ');
        soyIdom.print(item.title);
        incrementalDom.elementClose('div');
      }

      exports.__deltemplate_s3897_99e049dd = __deltemplate_s3897_99e049dd;
      /**
       * @typedef {{
       *  queryValue: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  item: (?),
       *  spritemap: (!goog.soy.data.SanitizedContent|string),
       *  _handleClick: (?)
       * }}
       */

      __deltemplate_s3897_99e049dd.Params;

      if (goog.DEBUG) {
        __deltemplate_s3897_99e049dd.soyTemplateName = 'SearchResults.__deltemplate_s3897_99e049dd';
      }

      soy.$$registerDelegateFn(soy.$$getDelTemplateId('SearchResults.Item.idom'), 'category', 0, __deltemplate_s3897_99e049dd);
      /**
       * @param {{
       *  queryValue: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  item: (?),
       *  spritemap: (!goog.soy.data.SanitizedContent|string),
       *  _handleClick: (?)
       * }} opt_data
       * @param {Object<string, *>=} opt_ijData
       * @param {Object<string, *>=} opt_ijData_deprecated
       * @return {void}
       * @suppress {checkTypes}
       */

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

        soy.asserts.assertType(opt_data.queryValue == null || goog.isString(opt_data.queryValue) || opt_data.queryValue instanceof goog.soy.data.SanitizedContent, 'queryValue', opt_data.queryValue, '!goog.soy.data.SanitizedContent|null|string|undefined');

        /** @type {?} */

        var item = opt_data.item;
        /** @type {!goog.soy.data.SanitizedContent|string} */

        soy.asserts.assertType(goog.isString(opt_data.spritemap) || opt_data.spritemap instanceof goog.soy.data.SanitizedContent, 'spritemap', opt_data.spritemap, '!goog.soy.data.SanitizedContent|string');

        /** @type {?} */

        var _handleClick = opt_data._handleClick;
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'commerce-suggestions__label');
        incrementalDom.attr('onclick', _handleClick);
        incrementalDom.attr('data-onmouseenter', 'handleMouseEnter');
        incrementalDom.attr('data-onmouseleave', 'handleMouseLeave');
        incrementalDom.attr('data-pos', item.pos);
        incrementalDom.elementOpenEnd();
        soyIdom.print(item.title);
        incrementalDom.elementClose('div');
      }

      exports.__deltemplate_s3920_0b17afaf = __deltemplate_s3920_0b17afaf;
      /**
       * @typedef {{
       *  queryValue: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  item: (?),
       *  spritemap: (!goog.soy.data.SanitizedContent|string),
       *  _handleClick: (?)
       * }}
       */

      __deltemplate_s3920_0b17afaf.Params;

      if (goog.DEBUG) {
        __deltemplate_s3920_0b17afaf.soyTemplateName = 'SearchResults.__deltemplate_s3920_0b17afaf';
      }

      soy.$$registerDelegateFn(soy.$$getDelTemplateId('SearchResults.Item.idom'), 'label', 0, __deltemplate_s3920_0b17afaf);
      exports.render.params = ["queryValue", "results", "visible", "spritemap", "loading", "_handleClick"];
      exports.render.types = {
        "queryValue": "string ",
        "results": "? ",
        "visible": "bool ",
        "spritemap": "string ",
        "loading": "bool ",
        "_handleClick": "? "
      };
      exports.templates = templates = exports;
      return exports;
    });

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

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

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

      return SearchResults;
    }(_metalComponent.default);

    exports.SearchResults = SearchResults;

    _metalSoy.default.register(SearchResults, templates);

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

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