import{S as b,A as h}from"./ActionButton.e689c3e2.js";import{W}from"./WidgetsFrame.bef91c2b.js";import{d as k,eB as B,r as A,b as r,c as a,w as I,ex as f,e as p,ev as u,eC as m,eS as P,a$ as _,n as S,p as x,v as C}from"./outputWidgets.84fe9cdf.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]="7785d21b-c0e3-47a8-a60e-0015e82eac73",o._sentryDebugIdIdentifier="sentry-dbid-7785d21b-c0e3-47a8-a60e-0015e82eac73")}catch{}})();const D={class:"form"},q={class:"form-wrapper"},E={key:0,class:"buttons"},L=k({__name:"WidgetPreview",setup(o){const s=B(),i=A([]);function y(e){return S[e]||x[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{return 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:"form","font-family":"Inter"},{default:I(()=>[v()?(r(),a(b,{key:0,"steps-info":{current:2,total:3}})):f("",!0),p("div",D,[p("div",q,[(r(!0),u(_,null,m(g(),(n,w)=>(r(),u("div",{key:w,class:"widget"},[(r(),a(P(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(h,{key:n,"display-name":l(n).name,action:l(n)},null,8,["display-name","action"]))),128))])):f("",!0)])]),_:1}))}});const O=C(L,[["__scopeId","data-v-ef293d5b"]]);export{O as default};
//# sourceMappingURL=WidgetPreview.85e88744.js.map
