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