Liferay.Loader.define("commerce-product-options-web@3.0.22/CPOptionValueList.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.CPOptionValueList = 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 CPOptionValueList.soy.
      // Please don't edit this file by hand.

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

      goog.module('CPOptionValueList.incrementaldom');

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

      goog.require('goog.string');

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

      goog.require('soy.asserts');

      var soyIdom = goog.require('soy.idom');
      /**
       * @param {{
       *  currentCPOptionValueId: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  id: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  optionValues: (?),
       *  pathThemeImages: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  newOptionValueName: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  _handleAddOptionValueClick: (*|null|undefined),
       *  _handleSelectOptionValueClick: (*|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|string|undefined} */

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

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

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

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

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

        var _handleAddOptionValueClick = opt_data._handleAddOptionValueClick;
        /** @type {*|null|undefined} */

        var _handleSelectOptionValueClick = opt_data._handleSelectOptionValueClick;
        incrementalDom.elementOpenStart('h4');
        incrementalDom.attr('class', 'section-header');
        incrementalDom.elementOpenEnd();
        /** @desc  */

        var MSG_EXTERNAL_5427838110449455075 = Liferay.Language.get('option-values');
        incrementalDom.text(goog.string.unescapeEntities(MSG_EXTERNAL_5427838110449455075));
        incrementalDom.elementOpenStart('button');
        incrementalDom.attr('class', 'btn btn-primary nav-btn nav-btn-monospaced navbar-breakpoint-down-d-none');
        incrementalDom.attr('onClick', _handleAddOptionValueClick);
        incrementalDom.attr('type', 'button');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('svg');
        incrementalDom.attr('aria-hidden', 'true');
        incrementalDom.attr('class', 'lexicon-icon lexicon-icon-plus');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('use');
        incrementalDom.attr('xlink:href', pathThemeImages + '/lexicon/icons.svg#plus');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementClose('use');
        incrementalDom.elementClose('svg');
        incrementalDom.elementClose('button');
        incrementalDom.elementClose('h4');
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('id', id);
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('table');
        incrementalDom.attr('class', 'table table-autofit table-heading-nowrap table-hover table-responsive');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpen('thead');
        incrementalDom.elementOpen('tr');
        incrementalDom.elementOpenStart('th');
        incrementalDom.attr('class', 'table-cell-content');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('span');
        incrementalDom.attr('class', 'text-truncate');
        incrementalDom.attr('title', 'Description');
        incrementalDom.elementOpenEnd();
        /** @desc  */

        var MSG_EXTERNAL_3325180562659478330 = Liferay.Language.get('name');
        incrementalDom.text(goog.string.unescapeEntities(MSG_EXTERNAL_3325180562659478330));
        incrementalDom.elementClose('span');
        incrementalDom.elementClose('th');
        incrementalDom.elementOpen('th');
        incrementalDom.elementOpenStart('span');
        incrementalDom.attr('class', 'text-truncate');
        incrementalDom.attr('title', 'Priority');
        incrementalDom.elementOpenEnd();
        /** @desc  */

        var MSG_EXTERNAL_3571377974793640030 = Liferay.Language.get('priority');
        incrementalDom.text(goog.string.unescapeEntities(MSG_EXTERNAL_3571377974793640030));
        incrementalDom.elementClose('span');
        incrementalDom.elementClose('th');
        incrementalDom.elementClose('tr');
        incrementalDom.elementClose('thead');
        incrementalDom.elementOpen('tbody');

        incrementalDom.elementOpenStart('tr');
        incrementalDom.attr('data-id', '0');
        (function attributes__soy465() {
          incrementalDom.attr('class', ' table-active' + (currentCPOptionValueId == '0' ? ' show' : ' hide'));
        })();
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('td');
        incrementalDom.attr('class', 'table-cell-content');
        incrementalDom.elementOpenEnd();

        if (newOptionValueName == '') {
          incrementalDom.text('[');
          /** @desc  */

          var MSG_EXTERNAL_1931813061153538953 = Liferay.Language.get('new-option-value');
          incrementalDom.text(goog.string.unescapeEntities(MSG_EXTERNAL_1931813061153538953));
          incrementalDom.text(']');
        } else {
          soyIdom.print(newOptionValueName);
        }

        incrementalDom.elementClose('td');
        incrementalDom.elementOpen('td');
        incrementalDom.elementClose('td');
        incrementalDom.elementOpen('td');
        incrementalDom.elementClose('td');
        incrementalDom.elementClose('tr');

        if (optionValues) {
          var optionValue509List = optionValues;
          var optionValue509ListLen = optionValue509List.length;

          for (var optionValue509Index = 0; optionValue509Index < optionValue509ListLen; optionValue509Index++) {
            var optionValue509Data = optionValue509List[optionValue509Index];
            var classes__soy492 = '';
            classes__soy492 += optionValue509Data.cpOptionValueId == currentCPOptionValueId ? ' table-active' : '';
            incrementalDom.elementOpenStart('tr');
            incrementalDom.attr('class', classes__soy492);
            incrementalDom.attr('data-id', optionValue509Data.cpOptionValueId);
            incrementalDom.attr('onclick', _handleSelectOptionValueClick);
            incrementalDom.elementOpenEnd();
            incrementalDom.elementOpenStart('td');
            incrementalDom.attr('class', 'table-cell-content');
            incrementalDom.elementOpenEnd();
            soyIdom.print(optionValue509Data.name);
            incrementalDom.elementClose('td');
            incrementalDom.elementOpen('td');
            soyIdom.print(optionValue509Data.priority);
            incrementalDom.elementClose('td');
            incrementalDom.elementClose('tr');
          }
        }

        incrementalDom.elementClose('tbody');
        incrementalDom.elementClose('table');
        incrementalDom.elementClose('div');
      }

      exports.render = $render;
      /**
       * @typedef {{
       *  currentCPOptionValueId: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  id: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  optionValues: (?),
       *  pathThemeImages: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  newOptionValueName: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  _handleAddOptionValueClick: (*|null|undefined),
       *  _handleSelectOptionValueClick: (*|null|undefined)
       * }}
       */

      $render.Params;

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

      exports.render.params = ["currentCPOptionValueId", "id", "optionValues", "pathThemeImages", "newOptionValueName", "_handleAddOptionValueClick", "_handleSelectOptionValueClick"];
      exports.render.types = {
        "currentCPOptionValueId": "string",
        "id": "string",
        "optionValues": "?",
        "pathThemeImages": "string",
        "newOptionValueName": "string",
        "_handleAddOptionValueClick": "any",
        "_handleSelectOptionValueClick": "any"
      };
      exports.templates = templates = exports;
      return exports;
    });

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

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

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

      return CPOptionValueList;
    }(_metalComponent.default);

    exports.CPOptionValueList = CPOptionValueList;

    _metalSoy.default.register(CPOptionValueList, templates);

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

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