import{d as e,i as t,updateDynamicComponent as n}from"./nc-main-C6OeyNBF.js";import{createBlock as r,inject as i,onMounted as a,openBlock as o,ref as s,resolveDynamicComponent as c,unref as l,watch as u}from"/vue.js";var d=Object.assign({name:`NcInclude`},{__name:`nc-include`,props:{id:{type:String,default:void 0},include:{type:String,default:()=>``},inline:{type:Boolean,default:()=>!1}},setup(d){let f=d,p=i(`state`),m={},h=s();function g(e){e.error?t.setError(p,e.error):e.name?(m[f.include]=e,n(e,!1),h.value=e.name):t.setError(p,`component${f.include} has no name`)}function _(e){let t={error:e,name:``};m[f.include]=t,h.value=t.name}function v(){m[f.include]?h.value=m[f.include].name:e(f.include,!1,g,_,!1)}let y=``;return a(()=>{u(()=>f.include,()=>{y!==f.include&&(y=f.include,v())},{immediate:!0})}),(e,t)=>(o(),r(c(l(h))))}});export{d as default};