import{M as Membership,b as MembershipConfig}from"./membership-e92743d1.js";import{U as User}from"./User-1ef5a482.js";import{U as UserSettings}from"./UserSettings-27df01e6.js";import{C as CookieStorage}from"./cookie-1686830b.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 a={organisationDomain:o,organisationId:(new CookieStorage).get("mt_oid"),userId:(new CookieStorage).get("mt_uid"),role:(new CookieStorage).get("mt_role")};var i={Client:"d2ViLWNsaWVu"};if(r){i["Authorization"]="Bearer ".concat(r);i["Session-Token"]=t}else{i["Session-Token"]="NTdiMzY3NjBlNjNiY2UxZWViMDAwMDA0"}a.groupId=e;return{context:a,headers:i}}function getUserSettings(e,o,r,t,a,i){if(i===void 0){i="monday"}var s=[];if(a){s.push({id:"zoom",name:"Zoom",scope:[]})}return UserSettings.decode({timeFormat:e,dateFormat:o,timeZone:r,language:t,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};