import{d as b,eB as k,eA as h,b as m,c as i,w as n,aA as x,u as e,b$ as B,r as y,H as C,eG as P,f as s,ew as c}from"./outputWidgets.f8f8676d.js";import{_ as R,a as I}from"./FormTester.vue_vue_type_script_setup_true_lang.423e0668.js";import{S as T,L as A}from"./SmartConsole.473bd024.js";import{a as S}from"./asyncComputed.9c91cdf6.js";import{F as D}from"./forms.2d526500.js";import{W as N}from"./workspaces.31df14fc.js";import{_ as F}from"./SaveButton.vue_vue_type_script_setup_true_lang.2a589021.js";import{_ as L}from"./DocsButton.vue_vue_type_script_setup_true_lang.2226328a.js";import{_ as V}from"./LaunchButton.vue_vue_type_script_setup_true_lang.3e2f5703.js";import{B as q}from"./BaseLayout.f7927f02.js";import{r as E}from"./executeJs.1da1da3b.js";import{_ as H}from"./Debugger.vue_vue_type_script_setup_true_lang.0602cf1a.js";import{A as g,T as M}from"./TabPane.56eaca62.js";import"./index.c923b20f.js";import{c as U}from"./index.44b02920.js";import"./Title.53d37289.js";import"./transButton.ca7603a2.js";import"./Form.2b1bb5d1.js";import"./FormRunner.c1e8a6ad.js";import"./index.3bb94425.js";import"./pubsub.8eddc628.js";import"./CircularLoading.7abe007d.js";import"./WidgetsFrame.a66fb7a8.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.4a8d0188.js";import"./icons.c3170cf4.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.f27742c7.js";import"./index.2a23ecde.js";import"./CollapsePanel.cc3e3f63.js";import"./index.2ab0079e.js";import"./index.e041bc2d.js";import"./dashes.9d405fa0.js";import"./activeRecord.913921b5.js";import"./runnerData.8fc648cc.js";import"./hooks.96151980.js";import"./jobs.0ffa7c0c.js";import"./index.97771f01.js";import"./uuid.23323229.js";import"./url.46c79102.js";import"./ant-design.8ffd5ed0.js";import"./PlayerNavbar.4747a37d.js";import"./Steps.4e36f5e7.js";import"./Text.7ab5366c.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]="0042f222-8dca-47f0-9259-b351ae545ec9",a._sentryDebugIdIdentifier="sentry-dbid-0042f222-8dca-47f0-9259-b351ae545ec9")}catch{}})();const W=b({__name:"PreviewButton",props:{model:{}},setup(a){const o=a,f=k(),u=h(),r=()=>{const l=f.query;u.push({path:`/_editor/${o.model.routeName}/${encodeURIComponent(o.model.path)}/preview`,query:l})};return(l,t)=>(m(),i(e(B),{class:"preview-button",onClick:r},{default:n(()=>[x(" Preview ")]),_:1}))}}),Se=b({__name:"FormEditor",setup(a){const o=h(),f=k(),u=y(null),r=y("test");function l(){o.push({name:"forms"})}const{result:t,refetch:w}=S(()=>Promise.all([N.get(),D.get(f.params.formPath)]).then(([d,p])=>P({workspace:d,form:p}))),v=A.create();function $(d,p){E("editor",o,d,p)}return C(()=>f.params.formPath,()=>{w()}),(d,p)=>(m(),i(q,null,{navbar:n(()=>[e(t)?(m(),i(e(U),{key:0,title:e(t).form.title,style:{padding:"5px 10px"},onBack:l},{footer:n(()=>[s(e(M),{"active-key":r.value,"onUpdate:activeKey":p[0]||(p[0]=_=>r.value=_)},{default:n(()=>[s(e(g),{key:"test",tab:"Test"}),s(e(g),{key:"settings",tab:"Settings"})]),_:1},8,["active-key"])]),extra:n(()=>[s(H),s(V,{path:e(t).form.path},null,8,["path"]),s(L,{path:"forms/overview"}),s(W,{model:e(t).form},null,8,["model"]),r.value==="settings"?(m(),i(F,{key:0,model:e(t).form},null,8,["model"])):c("",!0)]),_:1},8,["title"])):c("",!0)]),content:n(()=>[e(t)&&r.value==="test"?(m(),i(R,{key:0,ref_key:"tester",ref:u,form:e(t).form,"log-service":e(v),onRedirect:$},null,8,["form","log-service"])):c("",!0),e(t)&&r.value==="settings"?(m(),i(I,{key:1,form:e(t).form},null,8,["form"])):c("",!0)]),footer:n(()=>{var _;return[e(t)&&r.value==="test"?(m(),i(T,{key:0,runtime:"forms","log-service":e(v),onRestart:(_=u.value)==null?void 0:_.restart},null,8,["log-service","onRestart"])):c("",!0)]}),_:1}))}});export{Se as default};
//# sourceMappingURL=FormEditor.f29b2e72.js.map
