import{r as p,h as r}from"./p-cb5076d4.js";import{i as t}from"./p-bfaa9282.js";import"./p-06588791.js";import"./p-944da115.js";import"./p-d343a062.js";import{c as s,b as o}from"./p-c4bbdd1e.js";import{g as i,m as e}from"./p-3a5f9c0f.js";import{a as m,b as a}from"./p-1a503a70.js";import"./p-83f217d4.js";import"./p-eebad85b.js";import"./p-0e4ae084.js";import"./p-8a308033.js";import"./p-0db2169b.js";import"./p-3b35e507.js";import"./p-1c5c6afa.js";import"./p-97c18602.js";import"./p-ecbaf6d8.js";import"./p-d50d0ec8.js";import"./p-c705c477.js";import"./p-4f99fb23.js";import"./p-d27cb594.js";import"./p-56d4255d.js";import"./p-73aa5f56.js";import"./p-138d8bf9.js";import"./p-814af281.js";import"./p-e929429b.js";import"./p-61301881.js";import"./p-35c7f358.js";import"./p-27da9105.js";import"./p-ad6da9fe.js";import"./p-9043df2a.js";import"./p-b0970d03.js";import"./p-234c1f97.js";import"./p-cb860bcb.js";import"./p-84720732.js";import"./p-65434c2b.js";import"./p-6cf8ecf7.js";const 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}=i(),a=s(e,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:e,userMetadata:n,viewConfigWrapper:j}=this,{context:d}=i();if(!p||!s||!o||!n||"mentor"===d.role&&!e)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,e);return r("mentornity-root-wrapper",null,r("dvn-card",null,r("dvn-app-view-form-view",{params:a(d,s,o,n,e),view:c})))}};t(n);export{n as mentornity_membership_settings_wrapper}