import{r as p,h as r}from"./p-1ea36ff3.js";import{i as t}from"./p-ba8c5151.js";import"./p-7e860896.js";import"./p-944da115.js";import"./p-d343a062.js";import{c as s,d as o}from"./p-d49099be.js";import{m as i}from"./p-d4bb09bf.js";import{g as e}from"./p-8dfe8365.js";import{a as m,b as a}from"./p-dfd34565.js";import"./p-83f217d4.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-70e54631.js";import"./p-d50d0ec8.js";import"./p-fac8edcc.js";import"./p-48f43f2a.js";import"./p-d27cb594.js";import"./p-56d4255d.js";import"./p-73aa5f56.js";import"./p-7957afd8.js";import"./p-814af281.js";import"./p-e929429b.js";import"./p-b1fbf520.js";import"./p-35c7f358.js";import"./p-32f47ea6.js";import"./p-ad6da9fe.js";import"./p-214632d0.js";import"./p-cd1b0e39.js";import"./p-234c1f97.js";import"./p-814c9d06.js";import"./p-63545896.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:d}=this,{context:j}=e();if(!p||!s||!o||!n||"mentor"===j.role&&!i)return r("mentornity-root-wrapper",null,r("div",{class:"d-flex justify-content-center pt-3"},r("dvn-progress",{indefinite:!0})));const f=m(j,t,s,d,o,n,i);return r("mentornity-root-wrapper",null,r("dvn-card",null,r("dvn-app-view-form-view",{params:a(j,s,o,n,i),view:f})))}};t(n);export{n as mentornity_membership_settings_wrapper}