import{_ as u}from"./BQlbyX0m.js";import{d as i,ar as l,I as s,h as c}from"./Bxv1kRJt.js";import"./Y8sfbbmi.js";import"./CJ5NhiWv.js";import"./Dv7rEyVi.js";const y=i({name:"ContentRenderer",props:{value:{type:Object,required:!1,default:()=>({})},excerpt:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(e){c(()=>e.excerpt,t=>{t&&!e.value?.excerpt&&(console.warn(`No excerpt found for document content/${e?.value?._path}.${e?.value?._extension}!`),console.warn("Make sure to use <!--more--> in your content if you want to use excerpt feature."))},{immediate:!0})},render(e){const t=l(),{value:r,excerpt:n,tag:o}=e,a=n?r?.excerpt:r?.body;return!a?.children?.length&&t?.empty?t.empty({value:r,excerpt:n,tag:o,...this.$attrs}):t?.default?t.default({value:r,excerpt:n,tag:o,...this.$attrs}):a?.type==="root"&&a?.children?.length?s(u,{value:r,excerpt:n,tag:o,...this.$attrs}):s("pre",null,JSON.stringify({message:"You should use slots with <ContentRenderer>",value:r,excerpt:n,tag:o},null,2))}});export{y as default};
