import{_ as k}from"./vp-builder-io.vue_vue_type_script_setup_true_lang-C5W75jjP.js";import"./index-GCDRvGOr.js";import{u as C}from"./useBreadcrumbs-CLanN9FL.js";import{M as v,E as m,e as c,F as g,b$ as x,U as _,N as r,a8 as n,O as t,R as u,V as D,Z as V,Y as S,P as f,Q as w,T as N,S as T}from"./vendor-CsGITfgk.js";import{g as O}from"./block-mapping-BPCjfVLe.js";import"./customComponents-CTvMze4c.js";const P={key:0},$={key:0,class:"mx-auto mt-7 w-full max-w-screen-2xl px-5 pb-5 md:px-12 lg:pb-10"},E=v({__name:"vp-page-builder",props:{content:{}},setup(l){const s=l,p=m(()=>c(e)?.settings?.name||c(e)?.settings?.header||""),i=C(()=>[{title:p.value}]),o=g(!1),e=g(null);function h(){e.value=null,o.value=!1}x(()=>{s.content?y():h()});function y(){if(!s.content)return;const d=JSON.parse(s.content);e.value=d,o.value=!0}return(d,F)=>{const b=_("VcBreadcrumbs"),B=_("VcTypography");return e.value?(t(),r("div",P,[!e.value.settings?.hideBreadcrumbs||e.value.settings?.header?(t(),r("div",$,[e.value.settings?.hideBreadcrumbs?n("",!0):(t(),u(b,{key:0,class:"mb-3",items:c(i)},null,8,["items"])),e.value.settings?.header?(t(),u(B,{key:1,tag:"h1"},{default:D(()=>[V(S(e.value.settings.header),1)]),_:1})):n("",!0)])):n("",!0),(t(!0),r(f,null,w(e.value.content,a=>(t(),r(f,null,[a.hidden?n("",!0):(t(),u(N(c(O)(a.type)),T({key:a.id},{ref_for:!0},a,{model:a,settings:e.value.settings}),null,16,["model","settings"]))],64))),256))])):n("",!0)}}}),U=v({__name:"virto-pages",props:{pageDocument:{}},setup(l){const s=l,p=m(()=>s.pageDocument?.source==="builder.io"),i=m(()=>s.pageDocument?.source==="page-builder");return(o,e)=>(t(),r("div",null,[i.value?(t(),u(E,{key:0,content:o.pageDocument?.content},null,8,["content"])):n("",!0),p.value?(t(),u(k,{key:1,content:o.pageDocument?.content},null,8,["content"])):n("",!0)]))}});export{U as default};
//# sourceMappingURL=virto-pages-CHmt3ZrZ.js.map
