import{r as e,c as t,h as i,H as n}from"./p-c1e62c18.js";import{a as s}from"./p-a48e8a8e.js";const a=class{constructor(i){e(this,i),this.action=t(this,"action",7),this.meetingsByIdentifiers={}}componentDidLoad(){this.fetchMeetings()}async fetchMeetings(){const e=await this.apiAtama.getMeetingsOfUser("","","",""),t={};e.results.forEach((e=>{t[e.meetingGoalIdentifier]=e})),this.meetingsByIdentifiers=t}render(){const{shownMeetingConfig:e,size:t,userRefFieldId:a}=this;return i(n,{class:"mb-3"},t<s.Medium?this.renderList():i("dvn-card",{leaned:!0,bodyLeaned:!0,elevation:0},this.renderList()),i("dvn-dialog",{title:e?e.name:void 0,shown:!!e,onDismiss:()=>this.shownMeetingConfig=void 0},e&&i("dvn-markdown",{content:e.specifications[a].description})))}renderList(){const{i18n:e,meetingsByIdentifiers:t,pairConfig:n,size:a}=this,o=a<s.Medium?"atama-structured-pair-overview-meeting-row-intense":"atama-structured-pair-overview-meeting-row";return n.structure.meetingConfigs.map(((s,a)=>{const r=n.structure.meetingConfigs.length>a+2&&n.structure.meetingConfigs[a+1];return i(o,{i18n:e,meeting:t[s.id],meetingConfig:s,meetingOrder:a+1,nextCompleted:r&&!!t[r.id],onCreateMeeting:e=>this.action.emit({name:"create-meeting-with-config-only",data:{meetingConfig:e}}),onShowMeetingDetail:e=>{this.action.emit({name:"open-meeting-detail",data:{meeting:e}})},onShowMeetingConfigDetail:e=>{this.shownMeetingConfig=e},showCreateMeetingButton:this.showCreateMeetingButton})}))}};a.style="atama-structured-pair-overview{display:block}";export{a as atama_structured_pair_overview}