import{_ as u}from"./BWgwykTL.js";import{d as i,G as l,ad as c,ae as s}from"./BvNnk7SS.js";import"./Bp47c7wY.js";import"./BXBHssRj.js";import"./DGhmaXto.js";const d=i({name:"ContentRenderer",props:{value:{type:Object,required:!1,default:()=>({})},excerpt:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(e){l(()=>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=c(),{value:n,excerpt:r,tag:o}=e,a=r?n?.excerpt:n?.body;return!a?.children?.length&&t?.empty?t.empty({value:n,excerpt:r,tag:o,...this.$attrs}):t?.default?t.default({value:n,excerpt:r,tag:o,...this.$attrs}):a?.type==="root"&&a?.children?.length?s(u,{value:n,excerpt:r,tag:o,...this.$attrs}):s("pre",null,JSON.stringify({message:"You should use slots with <ContentRenderer>",value:n,excerpt:r,tag:o},null,2))}}),x=d;export{x as default};
