import{_ as h}from"./ActionButton.vue_vue_type_script_setup_true_lang.5737790c.js";import{S as b}from"./Steps.77469d63.js";import{W}from"./WidgetsFrame.6243aeb3.js";import{d as k,ey as B,r as I,b as r,c as a,w as P,eu as f,e as p,er as u,ez as m,eH as D,bu as _,m as S,n as q,v as x}from"./registerWidgets.faec4901.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="8415944e-64ea-45af-8819-415a5f478ec0",o._sentryDebugIdIdentifier="sentry-dbid-8415944e-64ea-45af-8819-415a5f478ec0")}catch{}})();const A={class:"form"},C={class:"form-wrapper"},E={key:0,class:"buttons"},L=k({__name:"WidgetPreview",setup(o){const s=B(),i=I([]);function y(e){return S[e]||q[e]||null}function c(e){try{const t=JSON.parse(e);if(t.component=y(t.type),!t.component)throw new Error(`Widget ${t.type} not found`);return t.component?t:null}catch(t){return console.error(t),null}}function g(){const e=s.query.widget;return Array.isArray(e)?e.map(c).filter(Boolean):[c(e)]}function v(){return s.query.steps==="true"}function l(){const e=s.query.button;return e?Array.isArray(e)?e:[e]:[]}const d=e=>({name:e,isDefault:!1,isFocused:!1,focusOnButton:()=>{},addKeydownListener:()=>{},setElement:()=>{}});return(e,t)=>(r(),a(W,{"main-color":"#d14056",class:"preview",theme:"#fbfbfb",runtime:"dash","font-family":"Inter"},{default:P(()=>[v()?(r(),a(b,{key:0,"steps-info":{current:2,total:3}})):f("",!0),p("div",A,[p("div",C,[(r(!0),u(_,null,m(g(),(n,w)=>(r(),u("div",{key:w,class:"widget"},[(r(),a(D(n.component),{"user-props":n.userProps,value:n.userProps.value,errors:i.value},null,8,["user-props","value","errors"]))]))),128))]),l().length?(r(),u("div",E,[(r(!0),u(_,null,m(l(),n=>(r(),a(h,{key:n,"display-name":d(n).name,action:d(n)},null,8,["display-name","action"]))),128))])):f("",!0)])]),_:1}))}});const $=x(L,[["__scopeId","data-v-572c34ce"]]);export{$ as default};
//# sourceMappingURL=WidgetPreview.1879bee2.js.map
