import{d as b,eA as k,ez as w,b as s,c as m,w as i,aJ as h,u as e,c4 as x,r as y,f as n,ew as p,eF as $}from"./outputWidgets.cf5b7366.js";import{_ as B,a as C}from"./FormTester.vue_vue_type_script_setup_true_lang.8244f028.js";import{S as I,L as P}from"./SmartConsole.cae61376.js";import{a as R}from"./asyncComputed.2caa7fe6.js";import{F as T}from"./forms.0c753bf9.js";import{W as S}from"./workspaces.510e9023.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.75a1c197.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.f865416e.js";import{_ as F}from"./LaunchButton.vue_vue_type_script_setup_true_lang.d5b4a525.js";import{B as N}from"./BaseLayout.03efcbf5.js";import{A as g,T as L}from"./TabPane.730cc561.js";import"./index.f21a6e0d.js";import{c as V}from"./index.21604c00.js";import"./Title.adce1298.js";import"./Form.c8affe88.js";import"./broker.366e247c.js";import"./index.e4f20c17.js";import"./pubsub.664a70af.js";import"./executeJs.cf9bd84e.js";import"./icons.c510a141.js";import"./CircularLoading.832431bd.js";import"./PlayerNavbar.bb557329.js";import"./index.3d2fbf9e.js";import"./Steps.193c982b.js";import"./Modal.d2e187f0.js";import"./WidgetsFrame.9f056f5d.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.c820a0dc.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.4e56b000.js";import"./index.98a18e7b.js";import"./CollapsePanel.38c8849b.js";import"./index.54288d9b.js";import"./index.9583d9e9.js";import"./index.10cdfb2c.js";import"./dashes.75890af5.js";import"./activeRecord.f30e02c2.js";import"./hooks.8d5e93d9.js";import"./jobs.b1b148c3.js";import"./index.aee8b5d5.js";import"./uuid.8fd92523.js";import"./url.fb40e08c.js";import"./ant-design.55c856ad.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]="4c8cd609-dea1-4afc-b5b0-036cc26e1ccc",r._sentryDebugIdIdentifier="sentry-dbid-4c8cd609-dea1-4afc-b5b0-036cc26e1ccc")}catch{}})();const q=b({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,c=k(),u=w(),o=()=>{const l=c.query;u.push({path:`/_editor/${a.model.routeName}/${encodeURIComponent(a.model.path)}/preview`,query:l})};return(l,t)=>(s(),m(e(x),{class:"preview-button",onClick:o},{default:i(()=>[h(" Preview ")]),_:1}))}}),Ce=b({__name:"FormEditor",setup(r){const a=w(),c=k(),u=y(null),o=y("test");function l(){a.push({name:"forms"})}const{result:t}=R(()=>Promise.all([S.get(),T.get(c.params.formPath)]).then(([v,f])=>$({workspace:v,form:f}))),_=P.create();return(v,f)=>(s(),m(N,null,{navbar:i(()=>[e(t)?(s(),m(e(V),{key:0,title:e(t).form.title,style:{padding:"5px 10px"},onBack:l},{footer:i(()=>[n(e(L),{"active-key":o.value,"onUpdate:activeKey":f[0]||(f[0]=d=>o.value=d)},{default:i(()=>[n(e(g),{key:"test",tab:"Test"}),n(e(g),{key:"settings",tab:"Settings"})]),_:1},8,["active-key"])]),extra:i(()=>[n(F,{path:e(t).form.path},null,8,["path"]),n(D,{path:"forms/overview"}),n(q,{model:e(t).form},null,8,["model"]),o.value==="settings"?(s(),m(A,{key:0,model:e(t).form},null,8,["model"])):p("",!0)]),_:1},8,["title"])):p("",!0)]),content:i(()=>[e(t)&&o.value==="test"?(s(),m(B,{key:0,ref_key:"tester",ref:u,form:e(t).form,"log-service":e(_)},null,8,["form","log-service"])):p("",!0),e(t)&&o.value==="settings"?(s(),m(C,{key:1,form:e(t).form},null,8,["form"])):p("",!0)]),footer:i(()=>{var d;return[e(t)&&o.value==="test"?(s(),m(I,{key:0,runtime:"forms","log-service":e(_),onRestart:(d=u.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):p("",!0)]}),_:1}))}});export{Ce as default};
//# sourceMappingURL=FormEditor.fbc0144c.js.map
