import{_ as k}from"./ActionButton.vue_vue_type_script_setup_true_lang.0b91cf80.js";import{S as W}from"./Steps.b001c6e8.js";import{W as B}from"./WidgetsFrame.c49cae71.js";import{d as I,ey as q,r as d,b as t,u as a,eq as D,eu as f,er as p,c as u,ez as _,eG as S,bw as m,l as x,m as A,t as C}from"./registerWidgets.92d2f644.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="d35f6e7a-60d1-4070-8166-15f6258037bb",s._sentryDebugIdIdentifier="sentry-dbid-d35f6e7a-60d1-4070-8166-15f6258037bb")}catch{}})();const P={class:"form"},L={class:"form-wrapper"},V={key:0,class:"buttons"},E=I({__name:"WidgetPreview",setup(s){const r=q(),i=d(null),y=d([]);function g(e){return x[e]||A[e]||null}function c(e){try{const n=JSON.parse(e);return n.component=g(n.type),n.component?n:null}catch{return null}}function v(){const e=r.query.widget;return Array.isArray(e)?e.map(c).filter(Boolean):[c(e)]}function b(){return r.query.steps==="true"}function l(){const e=r.query.button;return e?Array.isArray(e)?e:[e]:[]}const w=e=>({name:e,isDefault:!1,isFocused:!1,focusOnButton:()=>{},addKeydownListener:()=>{},setElement:()=>{}});return(e,n)=>(t(),a(B,{"main-color":"#d14056",class:"preview",theme:"#fbfbfb",runtime:"dash","font-family":"Inter"},{default:D(()=>[b()?(t(),a(W,{key:0,"steps-info":{current:2,total:3}})):f("",!0),p("div",P,[p("div",L,[(t(!0),u(m,null,_(v(),(o,h)=>(t(),u("div",{key:h,class:"widget"},[(t(),a(S(o.component),{data:o.props,value:i.value,errors:y.value},null,8,["data","value","errors"]))]))),128))]),l().length?(t(),u("div",V,[(t(!0),u(m,null,_(l(),o=>(t(),a(k,{key:o,action:w(o)},null,8,["action"]))),128))])):f("",!0)])]),_:1}))}});const G=C(E,[["__scopeId","data-v-a38433ac"]]);export{G as default};
//# sourceMappingURL=WidgetPreview.7e22a1bb.js.map
