import{d as g,ez as k,ey as h,b as s,c as m,w as i,aI as $,u as e,c0 as B,r as y,J as C,f as p,ev as f,eE as I}from"./outputWidgets.8a1294ac.js";import{_ as P,a as R}from"./FormTester.vue_vue_type_script_setup_true_lang.98a0f1ff.js";import{S as T,L as S}from"./SmartConsole.c8a83b1e.js";import{a as D}from"./asyncComputed.3699cd44.js";import{F as N}from"./forms.66c73721.js";import{W as A}from"./workspaces.744a8260.js";import{_ as E}from"./SaveButton.vue_vue_type_script_setup_true_lang.e71a8bc9.js";import{_ as F}from"./DocsButton.vue_vue_type_script_setup_true_lang.417f95a4.js";import{_ as L}from"./LaunchButton.vue_vue_type_script_setup_true_lang.b3f9a35e.js";import{B as V}from"./BaseLayout.5edfc1d1.js";import"./index.04ab96ef.js";import{r as q}from"./executeJs.af47093a.js";import{A as b,T as M}from"./TabPane.50d60f15.js";import"./index.dfa4ecab.js";import{c as U}from"./index.d1c22e15.js";import"./Title.c5e29cf7.js";import"./Form.1860c0ed.js";import"./broker.3b899ed7.js";import"./index.ab2f1daa.js";import"./pubsub.5ff7800d.js";import"./CircularLoading.51eae7f9.js";import"./WidgetsFrame.e6aa905a.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.405074d8.js";import"./icons.25b21aee.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.85b36002.js";import"./index.310a46b6.js";import"./CollapsePanel.4c5c4fe6.js";import"./index.bf7f5369.js";import"./index.0f4f2049.js";import"./index.d5d7d1dc.js";import"./dashes.20f3fde0.js";import"./activeRecord.4f50a80e.js";import"./runnerData.9cd8b9cf.js";import"./hooks.e742fa23.js";import"./jobs.72cd80f9.js";import"./index.91683b65.js";import"./uuid.a09f1b9a.js";import"./url.9a5c0e6d.js";import"./ant-design.8f569ff8.js";import"./PlayerNavbar.2ca54895.js";import"./Steps.e4aad2cd.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[o]="f621ae95-4b98-4f8b-9bc6-cb53e2a2ae95",a._sentryDebugIdIdentifier="sentry-dbid-f621ae95-4b98-4f8b-9bc6-cb53e2a2ae95")}catch{}})();const W=g({__name:"PreviewButton",props:{model:{}},setup(a){const o=a,c=k(),u=h(),r=()=>{const l=c.query;u.push({path:`/_editor/${o.model.routeName}/${encodeURIComponent(o.model.path)}/preview`,query:l})};return(l,t)=>(s(),m(e(B),{class:"preview-button",onClick:r},{default:i(()=>[$(" Preview ")]),_:1}))}}),Te=g({__name:"FormEditor",setup(a){const o=h(),c=k(),u=y(null),r=y("test");function l(){o.push({name:"forms"})}const{result:t,refetch:w}=D(()=>Promise.all([A.get(),N.get(c.params.formPath)]).then(([d,n])=>I({workspace:d,form:n}))),v=S.create();function x(d,n){q("editor",o,d,n)}return C(()=>c.params.formPath,()=>{w()}),(d,n)=>(s(),m(V,null,{navbar:i(()=>[e(t)?(s(),m(e(U),{key:0,title:e(t).form.title,style:{padding:"5px 10px"},onBack:l},{footer:i(()=>[p(e(M),{"active-key":r.value,"onUpdate:activeKey":n[0]||(n[0]=_=>r.value=_)},{default:i(()=>[p(e(b),{key:"test",tab:"Test"}),p(e(b),{key:"settings",tab:"Settings"})]),_:1},8,["active-key"])]),extra:i(()=>[p(L,{path:e(t).form.path},null,8,["path"]),p(F,{path:"forms/overview"}),p(W,{model:e(t).form},null,8,["model"]),r.value==="settings"?(s(),m(E,{key:0,model:e(t).form},null,8,["model"])):f("",!0)]),_:1},8,["title"])):f("",!0)]),content:i(()=>[e(t)&&r.value==="test"?(s(),m(P,{key:0,ref_key:"tester",ref:u,form:e(t).form,"log-service":e(v),onRedirect:x},null,8,["form","log-service"])):f("",!0),e(t)&&r.value==="settings"?(s(),m(R,{key:1,form:e(t).form},null,8,["form"])):f("",!0)]),footer:i(()=>{var _;return[e(t)&&r.value==="test"?(s(),m(T,{key:0,runtime:"forms","log-service":e(v),onRestart:(_=u.value)==null?void 0:_.restart},null,8,["log-service","onRestart"])):f("",!0)]}),_:1}))}});export{Te as default};
//# sourceMappingURL=FormEditor.e677e613.js.map
