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