import{r as p,h as i}from"./p-9f21f85f.js";import{D as s}from"./p-7737f905.js";import{S as t}from"./p-c2c9e896.js";import"./p-e78d5616.js";import"./p-3968aca6.js";import"./p-d343a062.js";import{c as a,b as o}from"./p-a3d5ad34.js";import{M as e}from"./p-2c9430cc.js";import{g as r,a as m,s as n}from"./p-f88474bf.js";import{g as c,a as j,b as d,c as f}from"./p-7f7c468c.js";import"./p-105f7627.js";import"./p-62d6b6a7.js";import"./p-0563ceba.js";import"./p-1e47e7bd.js";import"./p-31e77e7b.js";import"./p-825ab276.js";import"./p-6c8be41c.js";import"./p-9f31253b.js";import"./p-1187cc7c.js";import"./p-881a2bb8.js";import"./p-968ee2ec.js";import"./p-5209de98.js";import"./p-19efc983.js";import"./p-3c7a3a90.js";import"./p-0ff0ee91.js";import"./p-d27cb594.js";import"./p-902ec37a.js";import"./p-e7d62c6a.js";import"./p-74e6e642.js";import"./p-84876749.js";import"./p-03b520ca.js";import"./p-814af281.js";import"./p-e929429b.js";import"./p-67d3bdb0.js";import"./p-1ba76ce7.js";import"./p-0988b316.js";import"./p-65eb3f89.js";import"./p-42939000.js";import"./p-efd6f539.js";import"./p-6af4d5e0.js";import"./p-85f443f9.js";import"./p-7048205a.js";import"./p-ca5153f1.js";import"./p-26046226.js";const w=class{constructor(i){p(this,i)}onAction(p){const i=p.detail;if("navigation"===i.type&&"forward"===i.direction){const p=i;if("open-pair-detail-view"===p.name){const{memberToViewRefFieldValue:i,pairId:s}=p.params;window.dispatchEvent(new CustomEvent("dvn.atama-pairs.open-pair-detail",{detail:{userId:i,pairId:s}}))}"pair-selection-page"===p.viewId&&window.dispatchEvent(new CustomEvent("dvn.atama-pairs.open-pair-selection-page",{})),"user-page"===p.viewId&&(this.viewUserDetailDialogActionData=p)}"send-message"===i.name&&(window.dispatchEvent(new CustomEvent("dvn.atama-pairs.send-message",{detail:{user:i.params.item.user}})),this.viewUserDetailDialogActionData=void 0)}async componentWillLoad(){const{language:p}=this,{context:i,headers:s}=r();this.mentornityBridgeApi=new e(m,i,s),this.apiSozluk=(new t).setLanguage(p).setContents(n);const j=a(m,s),d=await j.getViewConfigs(i.organisationId).catch((p=>this.error=p));if(!d)return;const f=d.results,w=await j.getOrganisationConfig(i.organisationId).catch((p=>this.error=p));w&&(this.organisationConfig=o.decode(w),this.atamaMemberPairsOverviewViewConfig=c(i,p,this.organisationConfig,f))}render(){const{context:p}=r(),{apiSozluk:t,mentornityBridgeApi:a,organisationConfig:o,viewUserDetailDialogActionData:e}=this;return this.atamaMemberPairsOverviewViewConfig?i("mentornity-root-wrapper",null,i("dvn-app-view-atama-member-pairs-overview-view",{apiAtama:a,apiUye:a,membership:s.decode({}),params:f(p),view:this.atamaMemberPairsOverviewViewConfig}),e&&i("dvn-dialog",{raw:!0,shown:!0,onDismiss:()=>this.viewUserDetailDialogActionData=void 0},i("dvn-app-view-detail-view-card",{apiSozluk:t,apiData:a,id:"user-page",params:j(e),view:d(p,o)}))):null}};export{w as mentornity_pairs_overview_wrapper}