import{getNodeAttribute as m}from"../../../../markdoc/helpers/get-node-attribute.js";import{setNodeAttributeValue as c}from"../../../../markdoc/helpers/set-node-attribute-value.js";import{readFileContent as l}from"../read-file-content.js";import{resolvePathInMarkdown as w}from"../resolve-path-in-markdown.js";import{MdResolveError as p}from"./md-resolve-error.js";async function R(o,e,i,{context:r,actions:s}){const n=m(o,e),a=s.contentDir;if(n){const t=w(n,i,a);if(!r.fs.exists(t))throw new p(`File ${t} does not exist`,{rawLink:t});const f=await l(t,r.fs);c(o,e+"RawContent",f)}}export{R as resolveRawContent};
