import{r as i,h as p}from"./p-1ea36ff3.js";import{D as a}from"./p-d50d0ec8.js";import{S as s}from"./p-16bf9265.js";import"./p-7e860896.js";import"./p-944da115.js";import"./p-d343a062.js";import{c as t,b as o}from"./p-d49099be.js";import{M as r}from"./p-214632d0.js";import{m as e}from"./p-d4bb09bf.js";import{g as m}from"./p-8dfe8365.js";import{s as n}from"./p-3a8caaf9.js";import{g as d,a as j,b as f,c}from"./p-7a8af4a6.js";import"./p-eebad85b.js";import"./p-28c66a78.js";import"./p-6eb29778.js";import"./p-681f800a.js";import"./p-3b35e507.js";import"./p-240d1ae7.js";import"./p-35267d98.js";import"./p-cd1b0e39.js";import"./p-234c1f97.js";import"./p-70e54631.js";import"./p-fac8edcc.js";import"./p-48f43f2a.js";import"./p-d27cb594.js";import"./p-56d4255d.js";import"./p-814c9d06.js";import"./p-73aa5f56.js";import"./p-7957afd8.js";import"./p-814af281.js";import"./p-e929429b.js";import"./p-7fd840fa.js";import"./p-5b0214f9.js";import"./p-32f47ea6.js";import"./p-c393f218.js";import"./p-165a9088.js";import"./p-bc737eae.js";import"./p-63545896.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:a}=i.params;window.dispatchEvent(new CustomEvent("dvn.atama-pairs.open-pair-detail",{detail:{userId:p,pairId:a}}))}"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:a}=m();this.mentornityBridgeApi=new r(e,p,a),this.apiSozluk=(new s).setLanguage(i).setContents(n);const j=t(e,a),f=await j.getViewConfigs(p.organisationId).catch((i=>this.error=i));if(!f)return;const c=f.results,w=await j.getOrganisationConfig(p.organisationId).catch((i=>this.error=i));w&&(this.organisationConfig=o.decode(w),this.atamaMemberPairsOverviewViewConfig=d(p,i,this.organisationConfig,c))}render(){const{context:i}=m(),{apiSozluk:s,mentornityBridgeApi:t,organisationConfig:o,viewUserDetailDialogActionData:r}=this;return this.atamaMemberPairsOverviewViewConfig?p("mentornity-root-wrapper",null,p("dvn-app-view-atama-member-pairs-overview-view",{apiAtama:t,apiUye:t,membership:a.decode({}),params:c(i),view:this.atamaMemberPairsOverviewViewConfig}),r&&p("dvn-dialog",{raw:!0,shown:!0,onDismiss:()=>this.viewUserDetailDialogActionData=void 0},p("dvn-app-view-detail-view-card",{apiSozluk:s,apiData:t,id:"user-page",params:j(r),view:f(i,o)}))):null}};export{w as mentornity_pairs_overview_wrapper}