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

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

      goog.module('AutocompleteItem.incrementaldom');

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

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

      goog.require('soy.asserts');

      var soyIdom = goog.require('soy.idom');
      /**
       * @param {{
       *  text: (!goog.soy.data.SanitizedContent|null|number|string|undefined),
       *  firstGroup: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  secondGroup: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  thirdGroup: (!goog.soy.data.SanitizedContent|null|string|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 text = soy.asserts.assertType(opt_data.text == null || goog.isNumber(opt_data.text) || goog.isString(opt_data.text) || opt_data.text instanceof goog.soy.data.SanitizedContent, 'text', opt_data.text, '!goog.soy.data.SanitizedContent|null|number|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */

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

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

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

        if (text != null) {
          incrementalDom.elementOpenStart('span');
          incrementalDom.attr('class', 'autocomplete-item');
          incrementalDom.elementOpenEnd();
          soyIdom.print(firstGroup);

          if (secondGroup != null) {
            incrementalDom.elementOpen('strong');
            soyIdom.print(secondGroup);
            incrementalDom.elementClose('strong');
          }

          if (thirdGroup != null) {
            soyIdom.print(thirdGroup);
          }

          incrementalDom.elementClose('span');
        }
      }

      exports.render = $render;
      /**
       * @typedef {{
       *  text: (!goog.soy.data.SanitizedContent|null|number|string|undefined),
       *  firstGroup: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  secondGroup: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  thirdGroup: (!goog.soy.data.SanitizedContent|null|string|undefined)
       * }}
       */

      $render.Params;

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

      exports.render.params = ["text", "firstGroup", "secondGroup", "thirdGroup"];
      exports.render.types = {
        "text": "string | number",
        "firstGroup": "string ",
        "secondGroup": "string ",
        "thirdGroup": "string "
      };
      exports.templates = templates = exports;
      return exports;
    });

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

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

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

      return AutocompleteItem;
    }(_metalComponent.default);

    exports.AutocompleteItem = AutocompleteItem;

    _metalSoy.default.register(AutocompleteItem, templates);

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

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