import{_ as v}from"./ActionButton.vue_vue_type_script_setup_true_lang.a22e4194.js";import{W as h,S as w}from"./WidgetsFrame.8a984b59.js";import{d as k,b as t,q as r,w as W,H as B,B as c,v as l,c as o,K as p,a5 as q,F as f,al as S,k as b,l as x,p as A}from"./registerWidgets.4cc86716.js";import"./colors.267ec6f7.js";const C={class:"form"},P={class:"form-wrapper"},F={key:0,class:"buttons"},L=k({__name:"WidgetPreview",setup(V){const a=B();function d(e){return b[e]||x[e]||null}function u(e){try{const n=JSON.parse(e);return n.component=d(n.type),n.response=new S,n.component?n:null}catch{return null}}function m(){const e=a.query.widget;return Array.isArray(e)?e.map(u).filter(Boolean):[u(e)]}function _(){return a.query.steps==="true"}function i(){const e=a.query.button;return e?Array.isArray(e)?e:[e]:[]}const y=e=>({name:e,isDefault:!1,isFocused:!1,focusOnButton:()=>{},addKeydownListener:()=>{},setElement:()=>{}});return(e,n)=>(t(),r(h,{"main-color":"#d14056",class:"preview",theme:"#fbfbfb",runtime:"dash","font-family":"Inter"},{default:W(()=>[_()?(t(),r(w,{key:0,"steps-info":{current:2,total:3}})):c("",!0),l("div",C,[l("div",P,[(t(!0),o(f,null,p(m(),(s,g)=>(t(),o("div",{key:g,class:"widget"},[(t(),r(q(s.component),{data:s.props,response:s.response},null,8,["data","response"]))]))),128))]),i().length?(t(),o("div",F,[(t(!0),o(f,null,p(i(),s=>(t(),r(v,{key:s,action:y(s)},null,8,["action"]))),128))])):c("",!0)])]),_:1}))}});const K=A(L,[["__scopeId","data-v-f3f8afa8"]]);export{K as default};
//# sourceMappingURL=WidgetPreview.f6120406.js.map
