import{getLocaleFromPathname as c}from"@redocly/theme/core/utils";const n=(d,r,a)=>{const{teams:t=[],idpAccessToken:s,claims:e,isAuthenticated:o}=r?.get("auth")||{},i=Object.fromEntries(r?.req.raw.headers.entries()??[]);return{variables:{rbac:{teams:t},user:e,headers:e?i:{},remoteAddr:r?.req.raw.context.remoteAddr,idpAccessToken:s,lang:c(d.slug,a?.defaultLocale,a?.locales)},serverPropsUser:{teams:t,claims:e,idpAccessToken:s,email:e?.email,idpId:e?.idpId,isAuthenticated:o}}};export{n as prepareContextVariables};
