import{F as d,m as u,ah as r,N as v,c1 as _,c2 as h,_ as C,R as g,e as b,c3 as B}from"./vendor-DtjVbdLs.js";import{a2 as S}from"./index-D5bkQlXq.js";import{b as k}from"./customComponents-7XuU0d5X.js";const R=d({__name:"vp-builder-io",props:{content:{}},setup(l){const t=l,{modulesSettings:i}=S(),p=u(()=>i.value?.find(e=>e.moduleId==="VirtoCommerce.BuilderIO")),m=u(()=>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()}),_(()=>{t.content?o():s()});function o(){if(!t.content)return;const e=JSON.parse(t.content);n.value={data:{blocks:e}},a.value=!0}h((e,c)=>{e.path!==c.path&&(s(),o())});const f=()=>k;return(e,c)=>(g(),C(b(B),{model:"page",content:n.value,"api-key":m.value,"custom-components":f()},null,8,["content","api-key","custom-components"]))}});export{R as _};
//# sourceMappingURL=vp-builder-io.vue_vue_type_script_setup_true_lang-Dl1FzoeM.js.map
