import{M as d,E as c,F as r,ax as v,b$ as C,c0 as _,R as b,e as g,c1 as h,O as B}from"./vendor-CsGITfgk.js";import{a3 as O}from"./index-GCDRvGOr.js";import{b as S}from"./customComponents-CTvMze4c.js";const x=d({__name:"vp-builder-io",props:{content:{}},setup(l){const t=l,{modulesSettings:i}=O(),p=c(()=>i.value?.find(e=>e.moduleId==="VirtoCommerce.BuilderIO")),m=c(()=>p.value?.settings.find(e=>e.name==="BuilderIO.PublicApiKey")?.value||"NO_KEY"),a=r(!1),n=r(null);function s(){n.value=null,a.value=!1}v(t,()=>{o()}),C(()=>{t.content?o():s()});function o(){if(!t.content)return;const e=JSON.parse(t.content);n.value={data:{blocks:e}},a.value=!0}_((e,u)=>{e.path!==u.path&&(s(),o())});const f=()=>S;return(e,u)=>(B(),b(g(h),{model:"page",content:n.value,"api-key":m.value,"custom-components":f()},null,8,["content","api-key","custom-components"]))}});export{x as _};
//# sourceMappingURL=vp-builder-io.vue_vue_type_script_setup_true_lang-C5W75jjP.js.map
