Liferay.Loader.define("commerce-frontend-taglib@19.1.14/user_utils/UserListItem.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.UserListItem=void 0;var a,s=_interopRequireDefault(n("frontend-js-metal-web$metal-component")),i=_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("UserListItem.incrementaldom"),goog.require("goog.soy.data.SanitizedContent"),goog.require("goog.string");var n=goog.require("incrementaldom");goog.require("soy.asserts"),goog.require("soy.idom");var s=i.default.getTemplate("AddToTickItem.incrementaldom","render"),o=i.default.getTemplate("AutocompleteItem.incrementaldom","render");function $render(e,a,i){a=i||a;var r=t.asserts.assertType(goog.isString(e.email)||e.email instanceof goog.soy.data.SanitizedContent,"email",e.email,"!goog.soy.data.SanitizedContent|string"),l=t.asserts.assertType(null==e.name||goog.isString(e.name)||e.name instanceof goog.soy.data.SanitizedContent,"name",e.name,"!goog.soy.data.SanitizedContent|null|string|undefined"),d=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"),m=t.asserts.assertType(null==e.thumbnail||goog.isString(e.thumbnail)||e.thumbnail instanceof goog.soy.data.SanitizedContent,"thumbnail",e.thumbnail,"!goog.soy.data.SanitizedContent|null|string|undefined"),u=t.asserts.assertType(null==e._invited||goog.isBoolean(e._invited)||1===e._invited||0===e._invited,"_invited",e._invited,"boolean|null|undefined"),g=t.asserts.assertType(null==e._status||goog.isString(e._status)||e._status instanceof goog.soy.data.SanitizedContent,"_status",e._status,"!goog.soy.data.SanitizedContent|null|string|undefined"),p=e._handleToggleInvitation;if(n.elementOpenStart("div"),n.attr("class","user-item"),n.elementOpenEnd(),n.elementOpenStart("div"),n.attr("class","user-item__content"),n.elementOpenEnd(),null!=m&&(n.elementOpenStart("div"),n.attr("class","user-item__thumbnail"),n.elementOpenEnd(),n.elementOpenStart("img"),n.attr("src",m),n.elementOpenEnd(),n.elementClose("img"),n.elementClose("div")),n.elementOpenStart("div"),n.attr("class","user-item__info"),n.elementOpenEnd(),null!=l)n.elementOpenStart("span"),n.attr("class","user-item__primary"),n.elementOpenEnd(),o({text:l,query:d},null,a),n.elementClose("span"),n.elementOpenStart("span"),n.attr("class","user-item__secondary"),n.elementOpenEnd(),o({text:r,query:d},null,a),n.elementClose("span");else{n.elementOpenStart("span"),n.attr("class","user-item__primary"),n.elementOpenEnd(),o({text:r,query:d},null,a),n.elementClose("span"),n.elementOpenStart("span"),n.attr("class","user-item__secondary"),n.elementOpenEnd();var c=g;switch(goog.isObject(c)?c.toString():c){case"user-not-found":var y=Liferay.Language.get("user-not-found-you-could-invite-a-new-user");n.text(goog.string.unescapeEntities(y));break;case"email-not-valid":var _=Liferay.Language.get("please-add-a-valid-email-address");n.text(goog.string.unescapeEntities(_));break;case"valid":var f=Liferay.Language.get("click-to-add-to-your-account");n.text(goog.string.unescapeEntities(f))}n.elementClose("span")}n.elementClose("div"),n.elementClose("div"),"valid"==g&&(n.elementOpenStart("button"),n.attr("class","user-item__action"),n.attr("data-onclick",p),n.elementOpenEnd(),s({added:u},null,a),n.elementClose("button")),n.elementClose("div")}return e.render=$render,$render.Params,goog.DEBUG&&($render.soyTemplateName="UserListItem.render"),e.render.params=["email","name","query","thumbnail","_invited","_status","_handleToggleInvitation"],e.render.types={email:"string ",name:"string ",query:"string ",thumbnail:"string ",_invited:"bool ",_status:"string",_handleToggleInvitation:"?"},e.templates=a=e,e}));class UserListItem extends s.default{}t.UserListItem=UserListItem,i.default.register(UserListItem,a);var o=a;t.default=o}}));
//# sourceMappingURL=UserListItem.soy.js.map