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

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

      goog.module('UserInputItem.incrementaldom');

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

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

      goog.require('soy.asserts');

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

      var $templateAlias1 = _metalSoy.default.getTemplate('ClayIcon.incrementaldom', 'render');
      /**
       * @param {{
       *  name: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  email: (!goog.soy.data.SanitizedContent|string),
       *  spritemap: (!goog.soy.data.SanitizedContent|string),
       *  thumbnail: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  _handleRemoveItem: (?)
       * }} 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 name = soy.asserts.assertType(opt_data.name == null || goog.isString(opt_data.name) || opt_data.name instanceof goog.soy.data.SanitizedContent, 'name', opt_data.name, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|string} */

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

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

        var _handleRemoveItem = opt_data._handleRemoveItem;
        incrementalDom.elementOpenStart('span');
        incrementalDom.attr('class', 'added-input-item');
        incrementalDom.elementOpenEnd();

        if (thumbnail != null) {
          incrementalDom.elementOpenStart('span');
          incrementalDom.attr('class', 'added-input-item__thumbnail');
          incrementalDom.elementOpenEnd();
          incrementalDom.elementOpenStart('img');
          incrementalDom.attr('src', thumbnail);
          incrementalDom.elementOpenEnd();
          incrementalDom.elementClose('img');
          incrementalDom.elementClose('span');
        }

        incrementalDom.elementOpenStart('span');
        incrementalDom.attr('class', 'added-input-item__text');
        incrementalDom.elementOpenEnd();

        if (name != null) {
          soyIdom.print(name);
        } else {
          soyIdom.print(email);
        }

        incrementalDom.elementClose('span');
        incrementalDom.elementOpenStart('button');
        incrementalDom.attr('class', 'added-input-item__delete');
        incrementalDom.attr('data-onclick', _handleRemoveItem);
        incrementalDom.elementOpenEnd();
        $templateAlias1({
          spritemap: spritemap,
          symbol: 'times'
        }, null, opt_ijData);
        incrementalDom.elementClose('button');
        incrementalDom.elementClose('span');
      }

      exports.render = $render;
      /**
       * @typedef {{
       *  name: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  email: (!goog.soy.data.SanitizedContent|string),
       *  spritemap: (!goog.soy.data.SanitizedContent|string),
       *  thumbnail: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  _handleRemoveItem: (?)
       * }}
       */

      $render.Params;

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

      exports.render.params = ["name", "email", "spritemap", "thumbnail", "_handleRemoveItem"];
      exports.render.types = {
        "name": "string ",
        "email": "string ",
        "spritemap": "string ",
        "thumbnail": "string ",
        "_handleRemoveItem": "?"
      };
      exports.templates = templates = exports;
      return exports;
    });

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

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

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

      return UserInputItem;
    }(_metalComponent.default);

    exports.UserInputItem = UserInputItem;

    _metalSoy.default.register(UserInputItem, templates);

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

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