import i from"path";import{resolveGlobMapValue as p}from"../../../utils/globs.js";function u({realRelativePath:t,frontmatter:e,markdown:r,contentDir:a}){const o=typeof e?.template=="string"?e.template:void 0;if(o)return{templateRef:o,templatePath:l(o,i.posix.dirname(t),a)};const n=p(t,r?.template);return n?{templateRef:n,templatePath:l(n,".",a)}:null}function l(t,e,r){return t.startsWith("./")||t.startsWith("../")?i.resolve(r,e,t):t}export{u as resolveMarkdownTemplate};
