import{_ as b}from"./ActionButton.vue_vue_type_script_setup_true_lang.42c8d93f.js";import{W as v,S as h}from"./WidgetsFrame.58e774c2.js";import{d as k,b as t,t as o,w as W,J as I,D as f,x as l,c as u,L as p,a7 as B,F as _,ao as D,l as q,m as x,q as S}from"./registerWidgets.0e006b6f.js";import"./colors.7dccb471.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[s]="1b06d32f-74e9-49f2-9aa3-4d514a113daa",a._sentryDebugIdIdentifier="sentry-dbid-1b06d32f-74e9-49f2-9aa3-4d514a113daa")}catch{}})();const A={class:"form"},C={class:"form-wrapper"},L={key:0,class:"buttons"},P=k({__name:"WidgetPreview",setup(a){const s=I();function i(e){return q[e]||x[e]||null}function d(e){try{const n=JSON.parse(e);return n.component=i(n.type),n.response=new D,n.component?n:null}catch{return null}}function m(){const e=s.query.widget;return Array.isArray(e)?e.map(d).filter(Boolean):[d(e)]}function y(){return s.query.steps==="true"}function c(){const e=s.query.button;return e?Array.isArray(e)?e:[e]:[]}const g=e=>({name:e,isDefault:!1,isFocused:!1,focusOnButton:()=>{},addKeydownListener:()=>{},setElement:()=>{}});return(e,n)=>(t(),o(v,{"main-color":"#d14056",class:"preview",theme:"#fbfbfb",runtime:"dash","font-family":"Inter"},{default:W(()=>[y()?(t(),o(h,{key:0,"steps-info":{current:2,total:3}})):f("",!0),l("div",A,[l("div",C,[(t(!0),u(_,null,p(m(),(r,w)=>(t(),u("div",{key:w,class:"widget"},[(t(),o(B(r.component),{data:r.props,response:r.response},null,8,["data","response"]))]))),128))]),c().length?(t(),u("div",L,[(t(!0),u(_,null,p(c(),r=>(t(),o(b,{key:r,action:g(r)},null,8,["action"]))),128))])):f("",!0)])]),_:1}))}});const J=S(P,[["__scopeId","data-v-f3f8afa8"]]);export{J as default};
//# sourceMappingURL=WidgetPreview.fa9fb4db.js.map
