import{reporter as f}from"../../tools/notifiers/reporter.js";import{MARKDOC_PARTIALS_DATA_KEY as u}from"../../constants/common.js";async function c(r,e,n,i,l,o,a){const m=!!e?.props?.compilationErrors?.length,s=r?.serverPropsGetterIds;return s?.length?Promise.all(s.map(async t=>{const p=l[t];if(!p){if(m)return{...e.props};await f.panicOnBuild(`Invalid server props getter id: "${t}" for route "${r.slug}"`)}return await(await p()).default({...r,...a},e,{variables:{...n,pageProps:i},partials:o.getGlobalConfig(u)},o)})||[]):[]}export{c as getServerPropsFromSystemHandlers};
