import{r as i,h as p}from"./p-9f21f85f.js";import{D as s}from"./p-aa5ffe14.js";import{S as a}from"./p-c2c9e896.js";import"./p-25d382ec.js";import"./p-3968aca6.js";import"./p-d343a062.js";import{g as t,m as o,c as r,e}from"./p-c44f96b9.js";import{M as m}from"./p-905285ef.js";import{s as n}from"./p-cb585cde.js";import{g as c,a as d,b as j,c as f}from"./p-afa9209f.js";import"./p-105f7627.js";import"./p-6a6f355f.js";import"./p-293acc32.js";import"./p-f2965a61.js";import"./p-0563ceba.js";import"./p-1e47e7bd.js";import"./p-31e77e7b.js";import"./p-825ab276.js";import"./p-6c8be41c.js";import"./p-1187cc7c.js";import"./p-881a2bb8.js";import"./p-968ee2ec.js";import"./p-d27cb594.js";import"./p-9c82afa0.js";import"./p-d6c479ab.js";import"./p-10cfccbb.js";import"./p-8d2ddf16.js";import"./p-814af281.js";import"./p-e929429b.js";import"./p-0988b316.js";import"./p-65eb3f89.js";import"./p-42939000.js";import"./p-a86d8cf2.js";import"./p-3ccedaa0.js";import"./p-9aa2fafd.js";import"./p-3d141e05.js";import"./p-d59ffc5b.js";import"./p-9258e9db.js";import"./p-5d192a8d.js";import"./p-729b7869.js";import"./p-dec9262b.js";import"./p-99829ff4.js";import"./p-33c4053b.js";const 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}=t();this.mentornityBridgeApi=new m(o,p,s),this.apiSozluk=(new a).setLanguage(i).setContents(n);const d=r(o,s),j=await d.getViewConfigs(p.organisationId).catch((i=>this.error=i));if(!j)return;const f=j.results,w=await d.getOrganisationConfig(p.organisationId).catch((i=>this.error=i));w&&(this.organisationConfig=e.decode(w),this.atamaMemberPairsOverviewViewConfig=c(p,i,this.organisationConfig,f))}render(){const{context:i}=t(),{apiSozluk:a,mentornityBridgeApi:o,organisationConfig:r,viewUserDetailDialogActionData:e}=this;return this.atamaMemberPairsOverviewViewConfig?p("mentornity-root-wrapper",null,p("dvn-app-view-atama-member-pairs-overview-view",{apiAtama:o,apiUye:o,membership:s.decode({}),params:f(i),view:this.atamaMemberPairsOverviewViewConfig}),e&&p("dvn-dialog",{raw:!0,shown:!0,onDismiss:()=>this.viewUserDetailDialogActionData=void 0},p("dvn-app-view-detail-view-card",{apiSozluk:a,apiData:o,id:"user-page",params:d(e),view:j(i,r)}))):null}};export{w as mentornity_pairs_overview_wrapper}