import{_ as w}from"./ActionButton.vue_vue_type_script_setup_true_lang.f47e89b8.js";import{S as h}from"./Steps.a44e7d48.js";import{W}from"./WidgetsFrame.28239fa9.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,eG as D,bu as _,m as S,n as q,v as x}from"./registerWidgets.9fce82a0.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]="d4c9fef2-2e60-4c06-87c9-82b2c6e9b284",o._sentryDebugIdIdentifier="sentry-dbid-d4c9fef2-2e60-4c06-87c9-82b2c6e9b284")}catch{}})();const A={class:"form"},C={class:"form-wrapper"},E={key:0,class:"buttons"},L=k({__name:"WidgetPreview",setup(o){const s=B(),c=I([]);function y(e){return S[e]||q[e]||null}function i(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(i).filter(Boolean):[i(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(h,{key:0,"steps-info":{current:2,total:3}})):f("",!0),p("div",A,[p("div",C,[(r(!0),u(_,null,m(g(),(n,b)=>(r(),u("div",{key:b,class:"widget"},[(r(),a(D(n.component),{"user-props":n.userProps,value:n.userProps.value,errors:c.value},null,8,["user-props","value","errors"]))]))),128))]),l().length?(r(),u("div",E,[(r(!0),u(_,null,m(l(),n=>(r(),a(w,{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.21510af1.js.map
