import{d as g,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.5f5dca9f.js";import{_ as B,a as C}from"./FormTester.vue_vue_type_script_setup_true_lang.fed218d1.js";import{S as I,L as P}from"./SmartConsole.9fe0ab76.js";import{a as R}from"./asyncComputed.eae0c0ea.js";import{F as T}from"./forms.f0016f62.js";import{W as S}from"./workspaces.48c8fd8f.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.4f8148d9.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.e0e69f03.js";import{_ as F}from"./LaunchButton.vue_vue_type_script_setup_true_lang.e5ee32b2.js";import{B as N}from"./BaseLayout.ff65337e.js";import{A as b,T as L}from"./TabPane.c45032a7.js";import"./index.449c0e71.js";import{c as V}from"./index.de5dbed2.js";import"./Title.c2ba09dc.js";import"./Form.09052538.js";import"./broker.37640dfb.js";import"./index.e7437d5b.js";import"./pubsub.628f19a6.js";import"./executeJs.1c5ab6ff.js";import"./icons.a77543dc.js";import"./CircularLoading.462d68bc.js";import"./PlayerNavbar.4ee9e4d0.js";import"./index.92c8cf6e.js";import"./Steps.1cddfe5a.js";import"./WidgetsFrame.17e6211e.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.88dc156d.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.0d7bb722.js";import"./index.903111e2.js";import"./CollapsePanel.0689bbb8.js";import"./index.9f395a03.js";import"./index.7ef152c5.js";import"./index.7ab474e7.js";import"./dashes.1843abee.js";import"./activeRecord.ad81cab4.js";import"./hooks.3f2564e0.js";import"./jobs.c17d5857.js";import"./index.10f6bb5a.js";import"./uuid.80bf1f32.js";import"./url.1555ad6e.js";import"./ant-design.b34b2997.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]="0bc6d5a3-0f59-4af8-a326-ab2069b052d9",r._sentryDebugIdIdentifier="sentry-dbid-0bc6d5a3-0f59-4af8-a326-ab2069b052d9")}catch{}})();const q=g({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,u=k(),f=w(),o=()=>{const l=u.query;f.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=g({__name:"FormEditor",setup(r){const a=w(),u=k(),f=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,c])=>$({workspace:v,form:c}))),_=P.create();return(v,c)=>(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":c[0]||(c[0]=d=>o.value=d)},{default:i(()=>[n(e(b),{key:"test",tab:"Test"}),n(e(b),{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:f,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=f.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):p("",!0)]}),_:1}))}});export{Be as default};
//# sourceMappingURL=FormEditor.b7a7bf3f.js.map
