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.faf49e08.js";import{_ as C,a as $}from"./FormTester.vue_vue_type_script_setup_true_lang.2165ecb8.js";import{S as I,L as P}from"./SmartConsole.6d2b3045.js";import{a as R}from"./asyncComputed.70c50dd2.js";import{F as T}from"./forms.87eac015.js";import{W as D}from"./workspaces.5a397dd7.js";import{_ as S}from"./SaveButton.vue_vue_type_script_setup_true_lang.2808d1a6.js";import{_ as N}from"./DocsButton.vue_vue_type_script_setup_true_lang.d6a2f39c.js";import{B as F}from"./BaseLayout.2545ec4d.js";import{a as b,T as L}from"./index.65170895.js";import"./index.2c85525a.js";import{c as V}from"./index.d5a89d63.js";import"./Title.a7f9a7d9.js";import"./transButton.4230aac2.js";import"./FormItem.b7aa4c27.js";import"./Form.4d822450.js";import"./broker.8c828788.js";import"./passwordlessManager.c54f57c4.js";import"./pubsub.04fb37b2.js";import"./storage.0aff2700.js";import"./Passwordless.3ff1aad5.js";import"./CircularLoading.fde4d593.js";import"./icons.18b78fe3.js";import"./executeJs.2025b567.js";import"./PlayerNavbar.f8fbf721.js";import"./index.b0babef5.js";import"./Steps.7eab3176.js";import"./Modal.f708ef7e.js";import"./WidgetsFrame.b61f747c.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.b1e29378.js";import"./dashes.e9024cfc.js";import"./activeRecord.a639288f.js";import"./hooks.487cca4e.js";import"./jobs.96e90e4c.js";import"./uuid.0244e198.js";import"./index.e6dcb33c.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]="c82366e8-31ad-4891-87b6-1a999d4bbe80",r._sentryDebugIdIdentifier="sentry-dbid-c82366e8-31ad-4891-87b6-1a999d4bbe80")}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.3b4a0e14.js.map
