import{_ as b}from"./ActionButton.vue_vue_type_script_setup_true_lang.3383c9db.js";import{S as h}from"./Steps.114fc919.js";import{W}from"./WidgetsFrame.54753673.js";import{d as k,eA as B,r as I,b as r,c as a,w as P,ew as f,e as p,eu as u,eB as m,eI as x,bg as _,m as A,n as D,x as S}from"./outputWidgets.f120b477.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]="2ad92102-b446-49a1-a14e-846ebd8da0c3",o._sentryDebugIdIdentifier="sentry-dbid-2ad92102-b446-49a1-a14e-846ebd8da0c3")}catch{}})();const q={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 A[e]||D[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 d(){const e=s.query.button;return e?Array.isArray(e)?e:[e]:[]}const l=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(h,{key:0,"steps-info":{current:2,total:3}})):f("",!0),p("div",q,[p("div",C,[(r(!0),u(_,null,m(g(),(n,w)=>(r(),u("div",{key:w,class:"widget"},[(r(),a(x(n.component),{"user-props":n.userProps,value:n.userProps.value,errors:i.value},null,8,["user-props","value","errors"]))]))),128))]),d().length?(r(),u("div",E,[(r(!0),u(_,null,m(d(),n=>(r(),a(b,{key:n,"display-name":l(n).name,action:l(n)},null,8,["display-name","action"]))),128))])):f("",!0)])]),_:1}))}});const $=S(L,[["__scopeId","data-v-572c34ce"]]);export{$ as default};
//# sourceMappingURL=WidgetPreview.987d9514.js.map
