import c from"@markdoc/markdoc";import{transformMdAst as g}from"./runtime-transform";import{getPublicEnvVariables as d,logger as s}from"../../utils";async function P(o,a,r,i){const{ast:n,frontmatter:e,props:p,editPage:l,lastModified:f}=a,{headings:v,renderableAst:m,pageProps:t}=await g(c.Ast.fromJSON(n),{partials:r.partials,variables:{frontmatter:e,...r.variables,env:d()}},i);return process.env.NODE_ENV==="development"&&t&&(s.logSticky("serverProps",`Server props returned from ${o.fsPath}:`),s.logSticky("serverProps",JSON.stringify(t,null,2))),{...p,ast:m,headings:v,frontmatter:e,editPage:l,lastModified:f}}export{P as default};
