import{M as Membership}from"./membership-61c4a2f7.js";import{M as MembershipConfig}from"./membership-config-a51a5232.js";import{U as User}from"./User-d2ee8b71.js";import{U as UserSettings}from"./UserSettings-7b80b841.js";import{C as CookieStorage}from"./cookie-93ea205f.js";import{r as routeParser}from"./index-d3bd30bd.js";var mentornityApiEndpoint="https://api.mentornity.com";var appRoute="/:domain(/:page)(/:id)";function getRouteParams(e){return new routeParser(appRoute).match(e)}function getSessionDetails(e){var o=getRouteParams(location.pathname).domain;var r=(new CookieStorage).get("mt_at");var t=(new CookieStorage).get("mt_st");var i={organisationDomain:o,organisationId:(new CookieStorage).get("mt_oid"),userId:(new CookieStorage).get("mt_uid"),role:(new CookieStorage).get("mt_role")};var n={Client:"d2ViLWNsaWVu"};if(r){n["Authorization"]="Bearer "+r;n["Session-Token"]=t}else{n["Session-Token"]="NTdiMzY3NjBlNjNiY2UxZWViMDAwMDA0"}i.groupId=e;return{context:i,headers:n}}function getUserSettings(e,o,r,t){var i=[];if(t){i.push({id:"zoom",name:"Zoom",scope:[]})}return UserSettings.decode({timeFormat:e,timeZone:o,language:r,authPlatforms:i})}function generateMembershipForRole(e){return Membership.decode({config:generateMembershipConfigForRole(e)})}function generateMembershipConfigForRole(e){return MembershipConfig.decode({_id:e==="mentor"?"mentors":"mentees",roleName:e})}function getUser(e){return User.decode({_id:e})}export{generateMembershipConfigForRole as a,getRouteParams as b,getUser as c,getUserSettings as d,generateMembershipForRole as e,getSessionDetails as g,mentornityApiEndpoint as m};