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

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

      goog.module('CPOptionValuesEditor.incrementaldom');

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

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

      goog.require('soy.asserts');

      goog.require('soy.idom');

      var $templateAlias2 = _metalSoy.default.getTemplate('CPOptionValueDetail.incrementaldom', 'render');

      var $templateAlias1 = _metalSoy.default.getTemplate('CPOptionValueList.incrementaldom', 'render');
      /**
       * @param {{
       *  cpOptionId: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  id: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  show: (boolean|null|undefined),
       *  namespace: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  optionValueURL: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  pathThemeImages: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  _optionValues: (?),
       *  _currentOptionValue: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  _handleAddOptionValue: (*|null|undefined),
       *  _handleCancelEditing: (*|null|undefined),
       *  _handleClose: (*|null|undefined),
       *  _handleOptionValueDeleted: (*|null|undefined),
       *  _handleOptionValueSaved: (*|null|undefined),
       *  _handleOptionValueSelected: (*|null|undefined),
       *  _handleNameChange: (*|null|undefined),
       *  _newOptionValueName: (!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|string|undefined} */

        var cpOptionId = soy.asserts.assertType(opt_data.cpOptionId == null || goog.isString(opt_data.cpOptionId) || opt_data.cpOptionId instanceof goog.soy.data.SanitizedContent, 'cpOptionId', opt_data.cpOptionId, '!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 {boolean|null|undefined} */

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

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

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

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

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

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

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

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

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

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

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

        var _handleNameChange = opt_data._handleNameChange;
        /** @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');

        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('id', id);
        incrementalDom.elementOpenEnd();
        var classes__soy699 = '';
        classes__soy699 += ' modal';
        classes__soy699 += show ? ' show' : ' hide';

        if (show) {
          incrementalDom.elementOpenStart('div');
          incrementalDom.attr('class', 'fade modal-backdrop show');
          incrementalDom.elementOpenEnd();
          incrementalDom.elementClose('div');
        }

        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('aria-labelledby', 'clayLargeModalLabel');
        incrementalDom.attr('class', classes__soy699);
        incrementalDom.attr('role', 'dialog');
        incrementalDom.attr('tabindex', '-1');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'modal-dialog modal-full-screen');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'modal-content');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'modal-header');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'modal-title');
        incrementalDom.attr('id', 'clayLargeModalLabel');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementClose('div');
        incrementalDom.elementOpenStart('button');
        incrementalDom.attr('aria-labelledby', 'Close');
        incrementalDom.attr('class', 'close');
        incrementalDom.attr('data-dismiss', 'modal');
        incrementalDom.attr('onClick', _handleClose);
        incrementalDom.attr('role', 'button');
        incrementalDom.attr('type', 'button');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('svg');
        incrementalDom.attr('aria-hidden', 'true');
        incrementalDom.attr('class', 'lexicon-icon lexicon-icon-times');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('use');
        incrementalDom.attr('xlink:href', pathThemeImages + '/lexicon/icons.svg#times');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementClose('use');
        incrementalDom.elementClose('svg');
        incrementalDom.elementClose('button');
        incrementalDom.elementClose('div');
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'modal-body');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'row');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'col-md-6');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'card');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'card-body');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'form-container');
        incrementalDom.elementOpenEnd();
        $templateAlias1({
          currentCPOptionValueId: _currentOptionValue,
          newOptionValueName: _newOptionValueName,
          optionValues: _optionValues,
          pathThemeImages: pathThemeImages,
          events: {
            addOptionValue: _handleAddOptionValue,
            optionValueSelected: _handleOptionValueSelected
          }
        }, null, opt_ijData);
        incrementalDom.elementClose('div');
        incrementalDom.elementClose('div');
        incrementalDom.elementClose('div');
        incrementalDom.elementClose('div');
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'col-md-6');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'card');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'card-body');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'form-container');
        incrementalDom.elementOpenEnd();

        if (_currentOptionValue) {
          $templateAlias2({
            cpOptionId: cpOptionId,
            cpOptionValueId: _currentOptionValue,
            namespace: namespace,
            optionValueURL: optionValueURL,
            pathThemeImages: pathThemeImages,
            events: {
              cancel: _handleCancelEditing,
              optionValueDeleted: _handleOptionValueDeleted,
              optionValueSaved: _handleOptionValueSaved,
              nameChange: _handleNameChange
            }
          }, null, opt_ijData);
        }

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

      exports.render = $render;
      /**
       * @typedef {{
       *  cpOptionId: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  id: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  show: (boolean|null|undefined),
       *  namespace: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  optionValueURL: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  pathThemeImages: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  _optionValues: (?),
       *  _currentOptionValue: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  _handleAddOptionValue: (*|null|undefined),
       *  _handleCancelEditing: (*|null|undefined),
       *  _handleClose: (*|null|undefined),
       *  _handleOptionValueDeleted: (*|null|undefined),
       *  _handleOptionValueSaved: (*|null|undefined),
       *  _handleOptionValueSelected: (*|null|undefined),
       *  _handleNameChange: (*|null|undefined),
       *  _newOptionValueName: (!goog.soy.data.SanitizedContent|null|string|undefined)
       * }}
       */

      $render.Params;

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

      exports.render.params = ["cpOptionId", "id", "show", "namespace", "optionValueURL", "pathThemeImages", "_optionValues", "_currentOptionValue", "_handleAddOptionValue", "_handleCancelEditing", "_handleClose", "_handleOptionValueDeleted", "_handleOptionValueSaved", "_handleOptionValueSelected", "_handleNameChange", "_newOptionValueName"];
      exports.render.types = {
        "cpOptionId": "string",
        "id": "string",
        "show": "bool",
        "namespace": "string",
        "optionValueURL": "string",
        "pathThemeImages": "string",
        "_optionValues": "?",
        "_currentOptionValue": "string",
        "_handleAddOptionValue": "any ",
        "_handleCancelEditing": "any ",
        "_handleClose": "any ",
        "_handleOptionValueDeleted": "any ",
        "_handleOptionValueSaved": "any ",
        "_handleOptionValueSelected": "any ",
        "_handleNameChange": "any ",
        "_newOptionValueName": "string"
      };
      exports.templates = templates = exports;
      return exports;
    });

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

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

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

      return CPOptionValuesEditor;
    }(_metalComponent.default);

    exports.CPOptionValuesEditor = CPOptionValuesEditor;

    _metalSoy.default.register(CPOptionValuesEditor, templates);

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

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