import{r as i,h as p}from"./p-a0569a5f.js";import{D as s}from"./p-7737f905.js";import{S as t}from"./p-16bf9265.js";import"./p-e476a838.js";import"./p-944da115.js";import"./p-d343a062.js";import{c as a,b as e}from"./p-2cf91d8b.js";import{M as o}from"./p-924483bf.js";import{m as r}from"./p-d4bb09bf.js";import{g as m}from"./p-6fb74cfc.js";import{s as n}from"./p-b629ed53.js";import{g as d,a as j,b as c,c as f}from"./p-5235c682.js";import"./p-eebad85b.js";import"./p-8fd375f7.js";import"./p-8e1b37ed.js";import"./p-429e49d9.js";import"./p-b7a1e5c3.js";import"./p-3b35e507.js";import"./p-c67a5881.js";import"./p-cc3f853d.js";import"./p-40e6d149.js";import"./p-cd9003fd.js";import"./p-0bd6e3b1.js";import"./p-234c1f97.js";import"./p-da9525c7.js";import"./p-9224a4e9.js";import"./p-d27cb594.js";import"./p-a4d551dd.js";import"./p-6ccb7ef7.js";import"./p-74e6e642.js";import"./p-1bea6126.js";import"./p-31309282.js";import"./p-814af281.js";import"./p-e929429b.js";import"./p-81a7fe3d.js";import"./p-7eece8e9.js";import"./p-b897fb97.js";import"./p-36c55f66.js";import"./p-a9b1c03d.js";import"./p-7df4bf5d.js";import"./p-99ec0044.js";let w=class{constructor(p){i(this,p)}onAction(i){const p=i.detail;if("navigation"===p.type&&"forward"===p.direction){const i=p;if("open-pair-detail-view"===i.name){const{memberToViewRefFieldValue:p,pairId:s}=i.params;window.dispatchEvent(new CustomEvent("dvn.atama-pairs.open-pair-detail",{detail:{userId:p,pairId:s}}))}"pair-selection-page"===i.viewId&&window.dispatchEvent(new CustomEvent("dvn.atama-pairs.open-pair-selection-page",{})),"user-page"===i.viewId&&(this.viewUserDetailDialogActionData=i)}"send-message"===p.name&&(window.dispatchEvent(new CustomEvent("dvn.atama-pairs.send-message",{detail:{user:p.params.item.user}})),this.viewUserDetailDialogActionData=void 0)}async componentWillLoad(){const{language:i}=this,{context:p,headers:s}=m();this.mentornityBridgeApi=new o(r,p,s),this.apiSozluk=(new t).setLanguage(i).setContents(n);const j=a(r,s),c=await j.getViewConfigs(p.organisationId).catch((i=>this.error=i));if(!c)return;const f=c.results,w=await j.getOrganisationConfig(p.organisationId).catch((i=>this.error=i));w&&(this.organisationConfig=e.decode(w),this.atamaMemberPairsOverviewViewConfig=d(p,i,this.organisationConfig,f))}render(){const{context:i}=m(),{apiSozluk:t,mentornityBridgeApi:a,organisationConfig:e,viewUserDetailDialogActionData:o}=this;return this.atamaMemberPairsOverviewViewConfig?p("mentornity-root-wrapper",null,p("dvn-app-view-atama-member-pairs-overview-view",{apiAtama:a,apiUye:a,membership:s.decode({}),params:f(i),view:this.atamaMemberPairsOverviewViewConfig}),o&&p("dvn-dialog",{raw:!0,shown:!0,onDismiss:()=>this.viewUserDetailDialogActionData=void 0},p("dvn-app-view-detail-view-card",{apiSozluk:t,apiData:a,id:"user-page",params:j(o),view:c(i,e)}))):null}};export{w as mentornity_pairs_overview_wrapper}