Liferay.Loader.define("commerce-frontend-taglib@19.1.14/user_utils/UserInvitation.soy",["module","exports","require","frontend-js-metal-web$metal-component","frontend-js-metal-web$metal-soy"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.templates=t.UserInvitation=void 0;var a,r=_interopRequireDefault(n("frontend-js-metal-web$metal-component")),o=_interopRequireDefault(n("frontend-js-metal-web$metal-soy"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}t.templates=a,goog.loadModule((function(e){var t=goog.require("soy");goog.require("soydata"),goog.module("UserInvitation.incrementaldom"),goog.require("goog.soy.data.SanitizedContent");var n=goog.require("incrementaldom");goog.require("soy.asserts"),goog.require("soy.idom");var r=o.default.getTemplate("ClayIcon.incrementaldom","render"),i=o.default.getTemplate("UserInputItem.incrementaldom","render"),s=o.default.getTemplate("UserListItem.incrementaldom","render");function $render(e,a,o){a=o||a;var l=t.asserts.assertType(null==e.users||goog.isArray(e.users),"users",e.users,"!Array<{email: (!goog.soy.data.SanitizedContent|string), name: (!goog.soy.data.SanitizedContent|string), thumbnail: (!goog.soy.data.SanitizedContent|string), userId: (!goog.soy.data.SanitizedContent|number|string)}>|null|undefined"),d=t.asserts.assertType(null==e.addedUsers||goog.isArray(e.addedUsers),"addedUsers",e.addedUsers,"!Array<{email: (!goog.soy.data.SanitizedContent|string), name: (!goog.soy.data.SanitizedContent|string), thumbnail: (!goog.soy.data.SanitizedContent|string), userId: (!goog.soy.data.SanitizedContent|number|string)}>|null|undefined"),m=t.asserts.assertType(null==e.query||goog.isString(e.query)||e.query instanceof goog.soy.data.SanitizedContent,"query",e.query,"!goog.soy.data.SanitizedContent|null|string|undefined"),u=t.asserts.assertType(goog.isString(e.spritemap)||e.spritemap instanceof goog.soy.data.SanitizedContent,"spritemap",e.spritemap,"!goog.soy.data.SanitizedContent|string"),g=e._toggleInvitation,p=e._handleInputBox,y=e._handleFormSubmit,v="";if(v+=null!=m?m:"",n.elementOpenStart("div"),n.attr("class","user-invitation-wrapper"),n.elementOpenEnd(),n.elementOpenStart("div"),n.attr("class","autocomplete-input user-invitation__input"),n.elementOpenEnd(),n.elementOpenStart("div"),n.attr("class","autocomplete-input__icon"),n.elementOpenEnd(),r({spritemap:u,symbol:"search"},null,a),n.elementClose("div"),n.elementOpenStart("div"),n.attr("class","autocomplete-input__wrapper"),n.elementOpenEnd(),n.elementOpenStart("div"),n.attr("class","autocomplete-input__content"),n.elementOpenEnd(),null!=d)for(var f=d,c=f.length,I=0;I<c;I++){var _=f[I];i({events:{removeItem:g},userId:_.userId,email:_.email,name:_.name,thumbnail:_.thumbnail,spritemap:u},null,a)}if(n.elementOpenStart("form"),n.attr("data-onsubmit",y),n.attr("ref","form"),n.elementOpenEnd(),n.elementOpenStart("input"),n.attr("class","autocomplete-input__box"),n.attr("type","text"),n.attr("value",v),n.attr("data-onkeyup",p),n.elementOpenEnd(),n.elementClose("input"),n.elementClose("form"),n.elementClose("div"),n.elementClose("div"),n.elementClose("div"),n.elementOpenStart("div"),n.attr("class","user-invitation__list"),n.elementOpenEnd(),null!=l&&l.length>0)for(var S=l,b=S.length,C=0;C<b;C++){var h=S[C];s({events:{toggleInvitation:g},userId:h.userId,name:h.name,email:h.email,thumbnail:h.thumbnail,addedUsers:d,query:v},null,a)}null!=l&&0==l.length&&""!=v&&s({events:{toggleInvitation:g},email:v,addedUsers:d},null,a),n.elementClose("div"),n.elementClose("div")}return e.render=$render,$render.Params,goog.DEBUG&&($render.soyTemplateName="UserInvitation.render"),e.render.params=["users","addedUsers","query","spritemap","_toggleInvitation","_handleInputBox","_handleFormSubmit"],e.render.types={users:"list<[\n\t\tuserId: string | number,\n\t\tthumbnail: string,\n\t\tname: string,\n\t\temail: string\n\t]>",addedUsers:"list<[\n\t\tuserId: string | number,\n\t\tthumbnail: string,\n\t\tname: string,\n\t\temail: string\n\t]>",query:"string ",spritemap:"string ",_toggleInvitation:"any ",_handleInputBox:"any ",_handleFormSubmit:"any "},e.templates=a=e,e}));class UserInvitation extends r.default{}t.UserInvitation=UserInvitation,o.default.register(UserInvitation,a);var i=a;t.default=i}}));
//# sourceMappingURL=UserInvitation.soy.js.map