import{bm as B}from"./index-Bjc9_X6l.js";import{_ as x}from"./vp-builder-io.vue_vue_type_script_setup_true_lang-DMFPPDuh.js";import{u as C}from"./useBreadcrumbs-C3iwaFYZ.js";import{F as y,m,e as l,a3 as v,c0 as D,P as _,Q as u,W as a,R as t,_ as c,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-CB-jpi5M.js";import{g as F}from"./block-mapping-BPCjfVLe.js";import"./customComponents-DZtKf30Z.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(s){const n=s,i=m(()=>l(e)?.settings?.name||l(e)?.settings?.header||""),p=C(()=>[{title:i.value}]),o=v(!1),e=v(null);function d(){e.value=null,o.value=!1}D(()=>{n.content?g():d()});function g(){if(!n.content)return;const f=JSON.parse(n.content);e.value=f,o.value=!0}return(f,z)=>{const b=_("VcBreadcrumbs"),k=_("VcTypography");return e.value?(t(),u("div",O,[!e.value.settings?.hideBreadcrumbs||e.value.settings?.header?(t(),u("div",R,[e.value.settings?.hideBreadcrumbs?a("",!0):(t(),c(b,{key:0,class:"mb-3",items:l(p)},null,8,["items"])),e.value.settings?.header?(t(),c(k,{key:1,tag:"h1"},{default:w(()=>[V(N(e.value.settings.header),1)]),_:1})):a("",!0)])):a("",!0),(t(!0),u(h,null,S(e.value.content,r=>(t(),u(h,null,[r.hidden?a("",!0):(t(),c(T(l(F)(r.type)),L({key:r.id},{ref_for:!0},r,{model:r,settings:e.value.settings}),null,16,["model","settings"]))],64))),256))])):a("",!0)}}}),W=y({__name:"virto-pages",props:{pageDocument:{}},setup(s){const n=s,i=m(()=>n.pageDocument?.source==="builder.io"),p=m(()=>n.pageDocument?.source==="page-builder"),o=m(()=>n.pageDocument?.permalink),{updateLocalizedUrl:e}=B();return P(o,()=>{e(o.value)}),(d,g)=>(t(),u("div",null,[p.value?(t(),c($,{key:0,content:s.pageDocument?.content},null,8,["content"])):a("",!0),i.value?(t(),c(x,{key:1,content:s.pageDocument?.content},null,8,["content"])):a("",!0)]))}});export{W as default};
//# sourceMappingURL=virto-pages-DSs8faom.js.map
