import{_ as k}from"./ActionButton.vue_vue_type_script_setup_true_lang.bfc19705.js";import{S as W}from"./Steps.5d7ea3ec.js";import{W as B}from"./WidgetsFrame.bbded71d.js";import{d as D,J as I,r as l,b as t,t as a,w as q,D as f,x as p,c as u,L as _,$ as x,F as m,l as S,m as A,q as C}from"./registerWidgets.cecc7add.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]="a32092f4-d7e8-40fd-9038-2fbdbae64cef",s._sentryDebugIdIdentifier="sentry-dbid-a32092f4-d7e8-40fd-9038-2fbdbae64cef")}catch{}})();const L={class:"form"},P={class:"form-wrapper"},F={key:0,class:"buttons"},V=D({__name:"WidgetPreview",setup(s){const r=I(),i=l(null),y=l([]);function g(e){return S[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 d(){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:q(()=>[b()?(t(),a(W,{key:0,"steps-info":{current:2,total:3}})):f("",!0),p("div",L,[p("div",P,[(t(!0),u(m,null,_(v(),(o,h)=>(t(),u("div",{key:h,class:"widget"},[(t(),a(x(o.component),{data:o.props,value:i.value,errors:y.value},null,8,["data","value","errors"]))]))),128))]),d().length?(t(),u("div",F,[(t(!0),u(m,null,_(d(),o=>(t(),a(k,{key:o,action:w(o)},null,8,["action"]))),128))])):f("",!0)])]),_:1}))}});const $=C(V,[["__scopeId","data-v-a38433ac"]]);export{$ as default};
//# sourceMappingURL=WidgetPreview.63154699.js.map
