import{d as v,i as s,o as t,f as c,c as l,e as d,u as e,t as g,F as x,z as b,w as h,a as y,n as C,au as V}from"./DnBXlrVC.js";import F from"./CvsCXaD6.js";import{u as w}from"./BnJyr1eX.js";import"./K6vzxPhR.js";import"./b0zdy1x6.js";import"./DqVytocg.js";import"./Bf7bwUep.js";const B=V(F),D=["id"],E={contenteditable:"false",mt2:"",rounded:"","bg-active":"","px1.5":""},O={key:0,py1:"","text-xs":"","text-orange":""},U={key:1,flex:"","items-center":"",gap2:""},I=v({__name:"GenericComponentEditor",props:{contentRef:{type:[String,Object,Function]},view:{},getPos:{type:Function},setAttrs:{type:Function},node:{},selected:{},decorations:{},innerDecorations:{}},setup(p){const a=p,{getComponentProps:m}=w(),{componentName:i,mdcAttrs:n,model:r}=m(a,{}),u=!1;return(j,k)=>{const _=B;return t(),s("div",{id:e(r).id,relative:"",class:C(["group",e(r).class])},[c("div",E,[e(u)?(t(),s("div",O,g(`Unable to find editor for this component "${e(i)}". Dev only notice. `),1)):d("",!0),Object.keys(e(n)).length?(t(),s("div",U,[(t(!0),s(x,null,b(Object.keys(e(n)),o=>(t(),l(_,{key:o,modelValue:e(n)[o],"onUpdate:modelValue":f=>e(n)[o]=f,tooltip:o,label:o},null,8,["modelValue","onUpdate:modelValue","tooltip","label"]))),128))])):d("",!0)]),(t(),l(y(e(i)),null,{default:h(()=>[c("div",{ref:a.contentRef},null,512)]),_:1}))],10,D)}}});export{I as default};
