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