var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i["throw"](e))}catch(e){o(e)}}function u(e){e.done?n(e.value):r(e.value).then(a,s)}u((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];r=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-343b3b10.system.js","./p-69b24d07.system.js"],(function(e){"use strict";var t,n,i,r,o;return{setters:[function(e){t=e.r;n=e.c;i=e.h;r=e.H},function(e){o=e.a}],execute:function(){var a="atama-structured-pair-overview{display:block}";var s=e("atama_structured_pair_overview",function(){function e(e){t(this,e);this.action=n(this,"action",7);this.meetingsByIdentifiers={}}e.prototype.invalidate=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.fetchMeetings();return[2]}))}))};e.prototype.componentDidLoad=function(){this.fetchMeetings()};e.prototype.fetchMeetings=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,r,o,a;return __generator(this,(function(s){switch(s.label){case 0:t=this,n=t.pairConfig,i=t.userId,r=t.sessionUserId;return[4,this.apiTakvim.getMeetingsOfUser((e=n.calendarConfig)===null||e===void 0?void 0:e._id,[r,i])];case 1:o=s.sent();a={};o.results.forEach((function(e){a[e.meetingType]=e}));this.meetingsByIdentifiers=a;return[2]}}))}))};e.prototype.render=function(){var e=this;var t=this,n=t.shownMeetingConfig,a=t.size,s=t.userRefFieldId;var u=a<o.Medium;return i(r,{class:"mb-3"},u?this.renderList():i("dvn-card",{leaned:true,bodyLeaned:true,elevation:0},this.renderList()),i("dvn-dialog",{title:n?n.name:undefined,shown:!!n,onDismiss:function(){return e.shownMeetingConfig=undefined}},n&&i("dvn-markdown",{content:n.specifications[s].description})))};e.prototype.renderList=function(){var e=this;var t=this,n=t.i18n,r=t.meetingsByIdentifiers,a=t.pairConfig,s=t.size;var u=s<o.Medium;var c=u?"atama-structured-pair-overview-meeting-row-intense":"atama-structured-pair-overview-meeting-row";return a.structure.meetingConfigs.map((function(t,o){var s=r[t.id];var u=a.structure.meetingConfigs.length>o+2&&a.structure.meetingConfigs[o+1];var f=u&&!!r[u.id];return i(c,{i18n:n,meeting:s,meetingConfig:t,meetingOrder:o+1,nextCompleted:f,onCreateMeeting:function(t){return e.action.emit({name:"create-meeting-with-config-only",data:{meetingConfig:t}})},onShowMeetingDetail:function(t){e.action.emit({name:"open-meeting-detail",data:{meeting:t}})},onShowMeetingConfigDetail:function(t){e.shownMeetingConfig=t}})}))};return e}());s.style=a}}}));