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.800838e3.js";import{_ as B,a as C}from"./FormTester.vue_vue_type_script_setup_true_lang.f84d2880.js";import{S as I,L as P}from"./SmartConsole.064f9282.js";import{a as R}from"./asyncComputed.982dc1f5.js";import{F as T}from"./forms.ebcd7a71.js";import{W as S}from"./workspaces.d202f7b4.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.7bac205e.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.de73985e.js";import{_ as F}from"./LaunchButton.vue_vue_type_script_setup_true_lang.37c6521f.js";import{B as N}from"./BaseLayout.26c0e2f4.js";import{A as g,T as L}from"./TabPane.f110364a.js";import"./index.20e0b641.js";import{c as V}from"./index.23ff5dbe.js";import"./Title.28613ffd.js";import"./Form.b8148ab8.js";import"./broker.497b1c75.js";import"./index.c55f977a.js";import"./pubsub.3b460539.js";import"./executeJs.a7ef7cce.js";import"./icons.93f59c4e.js";import"./CircularLoading.760eaaec.js";import"./PlayerNavbar.3d115f65.js";import"./index.cc2e9ddf.js";import"./Steps.d86e1c08.js";import"./WidgetsFrame.98102695.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.665715fc.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.d9e0384d.js";import"./index.def49f90.js";import"./CollapsePanel.8fc227e9.js";import"./index.271ff5e3.js";import"./index.c4440e89.js";import"./index.960544fb.js";import"./dashes.b53773aa.js";import"./activeRecord.9d8d542d.js";import"./hooks.e7ca1357.js";import"./jobs.c91fe07e.js";import"./index.70fbd67e.js";import"./uuid.068c86dd.js";import"./url.e7bb6b8a.js";import"./ant-design.74cbd470.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]="16062966-c457-4262-a29b-c901e073059a",r._sentryDebugIdIdentifier="sentry-dbid-16062966-c457-4262-a29b-c901e073059a")}catch{}})();const q=b({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,u=k(),c=w(),o=()=>{const l=u.query;c.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}))}}),Be=b({__name:"FormEditor",setup(r){const a=w(),u=k(),c=y(null),o=y("test");function l(){a.push({name:"forms"})}const{result:t}=R(()=>Promise.all([S.get(),T.get(u.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:c,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=c.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):p("",!0)]}),_:1}))}});export{Be as default};
//# sourceMappingURL=FormEditor.a033a3d6.js.map
