import{d as g,ey as k,ex as w,b as s,c as m,w as n,b0 as h,u as e,cb as x,r as y,f as i,eu as p,eD as B}from"./registerWidgets.d207d3d8.js";import{_ as C,a as $}from"./FormTester.vue_vue_type_script_setup_true_lang.7412ccb4.js";import{S as I,L as P}from"./SmartConsole.f594a1ad.js";import{a as R}from"./asyncComputed.9245c077.js";import{F as T}from"./forms.ae7baac0.js";import{W as D}from"./workspaces.84f5cd92.js";import{_ as S}from"./SaveButton.vue_vue_type_script_setup_true_lang.a446ddad.js";import{_ as N}from"./DocsButton.vue_vue_type_script_setup_true_lang.28f3e777.js";import{B as F}from"./BaseLayout.0d1c7e47.js";import{a as b,T as L}from"./index.d8b0e5b9.js";import"./index.6d5d746b.js";import{c as V}from"./index.7710c197.js";import"./Title.db9c20f2.js";import"./transButton.c5e342ac.js";import"./FormItem.15ae57a9.js";import"./Form.93c8c2f5.js";import"./broker.2c7e4308.js";import"./passwordlessManager.66faf323.js";import"./pubsub.a025efb1.js";import"./storage.955f9c37.js";import"./Passwordless.80a0b6d6.js";import"./CircularLoading.cf2efea1.js";import"./icons.4cf3c6e7.js";import"./executeJs.481ad0ab.js";import"./PlayerNavbar.d9624b1f.js";import"./index.4ee96554.js";import"./Steps.2e23383d.js";import"./Modal.c3922cf6.js";import"./WidgetsFrame.4c3a4e18.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.f0cc8a39.js";import"./dashes.e3e34823.js";import"./activeRecord.3ac0bec0.js";import"./hooks.37f13771.js";import"./jobs.7da71109.js";import"./uuid.82f651b9.js";import"./index.ce572c42.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="5447e4c6-2274-418b-a635-8edf3f0b8030",r._sentryDebugIdIdentifier="sentry-dbid-5447e4c6-2274-418b-a635-8edf3f0b8030")}catch{}})();const q=g({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,u=k(),l=w(),o=()=>{const c=u.query;l.push({path:`/_editor/${a.model.routeName}/${encodeURIComponent(a.model.path)}/preview`,query:c})};return(c,t)=>(s(),m(e(x),{class:"preview-button",onClick:o},{default:n(()=>[h(" Preview ")]),_:1}))}}),ke=g({__name:"FormEditor",setup(r){const a=w(),u=k(),l=y(null),o=y("test");function c(){a.push({name:"forms"})}const{result:t}=R(()=>Promise.all([D.get(),T.get(u.params.formPath)]).then(([v,f])=>B({workspace:v,form:f}))),_=P.create();return(v,f)=>(s(),m(F,{"full-canvas":o.value==="test"},{navbar:n(()=>[e(t)?(s(),m(e(V),{key:0,title:e(t).form.title,onBack:c},{footer:n(()=>[i(e(L),{"active-key":o.value,"onUpdate:activeKey":f[0]||(f[0]=d=>o.value=d)},{default:n(()=>[i(e(b),{key:"test",tab:"Test"}),i(e(b),{key:"settings",tab:"Settings"})]),_:1},8,["active-key"])]),extra:n(()=>[i(N,{path:"forms/overview"}),i(q,{model:e(t).form},null,8,["model"]),o.value==="settings"?(s(),m(S,{key:0,model:e(t).form},null,8,["model"])):p("",!0)]),_:1},8,["title"])):p("",!0)]),content:n(()=>[e(t)&&o.value==="test"?(s(),m(C,{key:0,ref_key:"tester",ref:l,form:e(t).form,"log-service":e(_)},null,8,["form","log-service"])):p("",!0),e(t)&&o.value==="settings"?(s(),m($,{key:1,form:e(t).form},null,8,["form"])):p("",!0)]),footer:n(()=>{var d;return[e(t)&&o.value==="test"?(s(),m(I,{key:0,runtime:"forms","log-service":e(_),onRestart:(d=l.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):p("",!0)]}),_:1},8,["full-canvas"]))}});export{ke as default};
//# sourceMappingURL=FormEditor.7bc7d680.js.map
