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

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

      goog.module('SearchBar.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 {{
       *  placeholder: (!goog.soy.data.SanitizedContent|string),
       *  spritemap: (!goog.soy.data.SanitizedContent|string),
       *  query: (!goog.soy.data.SanitizedContent|string)
       * }} 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|string} */

        var placeholder = soy.asserts.assertType(goog.isString(opt_data.placeholder) || opt_data.placeholder instanceof goog.soy.data.SanitizedContent, 'placeholder', opt_data.placeholder, '!goog.soy.data.SanitizedContent|string');
        /** @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 {!goog.soy.data.SanitizedContent|string} */

        var query = soy.asserts.assertType(goog.isString(opt_data.query) || opt_data.query instanceof goog.soy.data.SanitizedContent, 'query', opt_data.query, '!goog.soy.data.SanitizedContent|string');
        incrementalDom.elementOpenStart('form');
        incrementalDom.attr('class', 'commerce-search');
        incrementalDom.attr('data-onsubmit', '_handleSubmit');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'commerce-search__input');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('input');
        incrementalDom.attr('autocomplete', 'off');
        incrementalDom.attr('data-onkeydown', '_handleKeyDown');
        incrementalDom.attr('data-onkeyup', '_handleKeyUp');
        incrementalDom.attr('name', 'queryString');
        incrementalDom.attr('placeholder', placeholder);
        incrementalDom.attr('ref', 'searchInput');
        incrementalDom.attr('type', 'text');
        incrementalDom.attr('value', query);
        incrementalDom.elementOpenEnd();
        incrementalDom.elementClose('input');
        incrementalDom.elementClose('div');
        incrementalDom.elementOpenStart('button');
        incrementalDom.attr('class', 'commerce-search__button ' + (query == '' ? 'is-ninja' : ''));
        incrementalDom.attr('data-onclick', '_handleResetQuery');
        incrementalDom.attr('type', 'button');
        incrementalDom.elementOpenEnd();
        $templateAlias1({
          spritemap: spritemap,
          symbol: 'times'
        }, null, opt_ijData);
        incrementalDom.elementClose('button');
        incrementalDom.elementClose('form');
      }

      exports.render = $render;
      /**
       * @typedef {{
       *  placeholder: (!goog.soy.data.SanitizedContent|string),
       *  spritemap: (!goog.soy.data.SanitizedContent|string),
       *  query: (!goog.soy.data.SanitizedContent|string)
       * }}
       */

      $render.Params;

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

      exports.render.params = ["placeholder", "spritemap", "query"];
      exports.render.types = {
        "placeholder": "string ",
        "spritemap": "string",
        "query": "string"
      };
      exports.templates = templates = exports;
      return exports;
    });

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

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

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

      return SearchBar;
    }(_metalComponent["default"]);

    exports.SearchBar = SearchBar;

    _metalSoy["default"].register(SearchBar, templates);

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

    exports["default"] = _default;
    //# sourceMappingURL=SearchBar.soy.js.map
  }
});
//# sourceMappingURL=SearchBar.soy.js.map