import{_ as k}from"./ActionButton.vue_vue_type_script_setup_true_lang.ab6c6d5f.js";import{S as W}from"./Steps.74e2104a.js";import{W as B}from"./WidgetsFrame.ade6550a.js";import{d as I,K as x,r as d,b as t,u as a,x as D,E as f,y as p,c as u,N as _,$ as S,F as m,l as q,m as A,t as C}from"./registerWidgets.2f354556.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]="731723e4-c648-467c-b9b8-d2a2cb54cd78",s._sentryDebugIdIdentifier="sentry-dbid-731723e4-c648-467c-b9b8-d2a2cb54cd78")}catch{}})();const P={class:"form"},E={class:"form-wrapper"},F={key:0,class:"buttons"},L=I({__name:"WidgetPreview",setup(s){const r=x(),c=d(null),y=d([]);function g(e){return q[e]||A[e]||null}function i(e){try{const n=JSON.parse(e);return n.component=g(n.type),n.component?n:null}catch{return null}}function b(){const e=r.query.widget;return Array.isArray(e)?e.map(i).filter(Boolean):[i(e)]}function v(){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(()=>[v()?(t(),a(W,{key:0,"steps-info":{current:2,total:3}})):f("",!0),p("div",P,[p("div",E,[(t(!0),u(m,null,_(b(),(o,h)=>(t(),u("div",{key:h,class:"widget"},[(t(),a(S(o.component),{data:o.props,value:c.value,errors:y.value},null,8,["data","value","errors"]))]))),128))]),l().length?(t(),u("div",F,[(t(!0),u(m,null,_(l(),o=>(t(),a(k,{key:o,action:w(o)},null,8,["action"]))),128))])):f("",!0)])]),_:1}))}});const $=C(L,[["__scopeId","data-v-a38433ac"]]);export{$ as default};
//# sourceMappingURL=WidgetPreview.58f7c415.js.map
