var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r["throw"](e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(a=o[0]&2?i["return"]:o[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;if(i=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;i=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1];a=o;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(o);break}if(a[2])n.ops.pop();n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e];i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-343b3b10.system.js","./p-7e6f8eaa.system.js","./p-94adbef3.system.js","./p-86f17250.system.js","./p-e847e88b.system.js"],(function(e){"use strict";var t,n,r,i,a,o;return{setters:[function(e){t=e.r;n=e.h;r=e.H;i=e.g},function(e){a=e.a},function(e){o=e.i},function(){},function(){}],execute:function(){var s="dvn-app-activate-membership{display:block;-ms-flex:1;flex:1}dvn-app-activate-membership .space-logo{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin-right:0.5rem}";function c(e){return n(r,{class:"d-block row justify-content-center pt-3"},n("div",{class:"col mt-3"},e))}var u=e("dvn_app_activate_membership",function(){function e(e){t(this,e);this.renderTrigger=0;this.isProgressing=false}e.prototype.activateMembership=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:e=this.membership;return[4,this.apiUye.activateMembership(e.config._id,e._id).catch((function(e){console.log(e)}))];case 1:t=n.sent();if(!t)return[2];this.appContextInvalidator();return[2]}}))}))};e.prototype.render=function(){var e=this;var t=this,r=t.membership,i=t.user;if(!r){return c(n("dvn-progress",{indefinite:true}))}return c(n("div",{class:"text-centered"},n("div",{class:"d-flex align-items-center justify-content-center"},n("dvn-image",{bordered:true,src:r.config.space.logoUrl,size:64,text:r.config.space.name[0]}),n("dvn-icon",{iconName:"uil uil-plus",scale:"large"}),n("dvn-image",{bordered:true,src:i.imageUrl,size:64,shape:"circle",text:a(i)})),n("p",null,"You're invited as ",n("i",null,r.config.roleName)," to join ",r.config.space.name,"."),n("dvn-button",{onClick:function(){return e.activateMembership()},tint:"primary"},"Accept Invitation")))};Object.defineProperty(e.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});return e}());o(u);u.style=s}}}));