import{M as Membership}from"./membership-821de3c5.js";import{M as MembershipConfig}from"./membership-config-68ed7772.js";import{U as User}from"./User-d2ee8b71.js";import{U as UserSettings}from"./UserSettings-7b80b841.js";import{C as CookieStorage}from"./cookie-647f9dc7.js";import{r as routeParser}from"./index-d3bd30bd.js";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 s={Client:"d2ViLWNsaWVu"};if(r){s["Authorization"]="Bearer "+r;s["Session-Token"]=t}else{s["Session-Token"]="NTdiMzY3NjBlNjNiY2UxZWViMDAwMDA0"}i.groupId=e;return{context:i,headers:s}}function getUserSettings(e,o,r,t,i){if(i===void 0){i="monday"}var s=[];if(t){s.push({id:"zoom",name:"Zoom",scope:[]})}return UserSettings.decode({timeFormat:e,timeZone:o,language:r,authPlatforms:s,weekStartDay: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};