import{r as p,h as r}from"./p-a0569a5f.js";import{i as t}from"./p-c2d7479c.js";import"./p-e476a838.js";import"./p-944da115.js";import"./p-d343a062.js";import{c as s,d as o}from"./p-2cf91d8b.js";import{m as i}from"./p-d4bb09bf.js";import{g as e}from"./p-6fb74cfc.js";import{a as m,b as a}from"./p-ded21e25.js";import"./p-83f217d4.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-da9525c7.js";import"./p-7737f905.js";import"./p-9224a4e9.js";import"./p-d27cb594.js";import"./p-a4d551dd.js";import"./p-74e6e642.js";import"./p-1bea6126.js";import"./p-31309282.js";import"./p-814af281.js";import"./p-e929429b.js";import"./p-0b1ac773.js";import"./p-35c7f358.js";import"./p-ad6da9fe.js";import"./p-4a8ff3c9.js";import"./p-b897fb97.js";import"./p-924483bf.js";import"./p-0bd6e3b1.js";import"./p-234c1f97.js";import"./p-6ccb7ef7.js";import"./p-99ec0044.js";import"./p-65434c2b.js";import"./p-6cf8ecf7.js";let n=class{constructor(r){p(this,r),this.isViewConfigWrapperLoaded=!1}onInvalidation(p){this.notifier.showCustomNotification(p.detail.notification)}componentWillLoad(){const{context:{organisationId:p,role:r,userId:t},headers:m}=e(),a=s(i,m);a.getOrganisationConfig(p).then((p=>{this.organisationConfig=p})),a.getViewConfig(p,"mentor"===r?o.MentorInfoForm:o.MenteeInfoForm).then((p=>{this.viewConfigWrapper=p})).finally((()=>this.isViewConfigWrapperLoaded=!0)),a.get("users",t).then((p=>{this.user=p})),a.getMetadataOfUser(p,"mentor"===r?"mentors":"mentees",t).then((p=>{this.userMetadata=p})),"mentor"===r&&a.getMentorshipOfUser(p,t).then((p=>{this.userMentorship=p}))}render(){const{isViewConfigWrapperLoaded:p,language:t,organisationConfig:s,user:o,userMentorship:i,userMetadata:n,viewConfigWrapper:j}=this,{context:d}=e();if(!p||!s||!o||!n||"mentor"===d.role&&!i)return r("mentornity-root-wrapper",null,r("div",{class:"d-flex justify-content-center pt-3"},r("dvn-progress",{indefinite:!0})));const c=m(d,t,s,j,o,n,i);return r("mentornity-root-wrapper",null,r("dvn-card",null,r("dvn-app-view-form-view",{params:a(d,s,o,n,i),view:c})))}};t(n);export{n as mentornity_membership_settings_wrapper}