import{d as g,ez as k,ey as h,b as m,c as i,w as n,aB as x,u as e,b_ as B,r as y,J as C,eE as P,f as s,ev as f}from"./outputWidgets.d6334d0e.js";import{_ as R,a as I}from"./FormTester.vue_vue_type_script_setup_true_lang.7a65c993.js";import{S as T,L as S}from"./SmartConsole.23edeb7d.js";import{a as D}from"./asyncComputed.95fd0999.js";import{F as N}from"./forms.7ea2277d.js";import{W as A}from"./workspaces.27037c79.js";import{_ as E}from"./SaveButton.vue_vue_type_script_setup_true_lang.6237af7f.js";import{_ as F}from"./DocsButton.vue_vue_type_script_setup_true_lang.cfa74815.js";import{_ as L}from"./LaunchButton.vue_vue_type_script_setup_true_lang.410980c4.js";import{B as V}from"./BaseLayout.17a4d39d.js";import"./index.85dd1fea.js";import{r as q}from"./executeJs.fc543c21.js";import{_ as M}from"./Debugger.vue_vue_type_script_setup_true_lang.5b576fab.js";import{A as b,T as U}from"./TabPane.c6ad6225.js";import"./index.4786e81a.js";import{c as W}from"./index.02b3bfd1.js";import"./Title.132c3f7f.js";import"./transButton.97ae4a5a.js";import"./Form.afe8a620.js";import"./FormRunner.1410369e.js";import"./index.39da7992.js";import"./pubsub.9d7d329e.js";import"./CircularLoading.4cd70ea8.js";import"./WidgetsFrame.23428b77.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.6b0fc39f.js";import"./icons.09e1f108.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.4f16d044.js";import"./index.87345988.js";import"./CollapsePanel.2424664e.js";import"./index.98d66b02.js";import"./index.6da051f8.js";import"./index.2221e01c.js";import"./dashes.0b98440a.js";import"./activeRecord.aa738a85.js";import"./runnerData.f9a0f655.js";import"./hooks.41346d54.js";import"./jobs.bc007f42.js";import"./index.e0fb68fa.js";import"./uuid.09e03d40.js";import"./url.dce42ecb.js";import"./ant-design.765336cf.js";import"./PlayerNavbar.b07eafb7.js";import"./Steps.ce57000c.js";import"./Text.2f6a30da.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]="47023cc2-bef6-48d8-ba75-d8a1a6c175a1",a._sentryDebugIdIdentifier="sentry-dbid-47023cc2-bef6-48d8-ba75-d8a1a6c175a1")}catch{}})();const z=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)=>(m(),i(e(B),{class:"preview-button",onClick:r},{default:n(()=>[x(" Preview ")]),_:1}))}}),Ae=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,p])=>P({workspace:d,form:p}))),v=S.create();function $(d,p){q("editor",o,d,p)}return C(()=>c.params.formPath,()=>{w()}),(d,p)=>(m(),i(V,null,{navbar:n(()=>[e(t)?(m(),i(e(W),{key:0,title:e(t).form.title,style:{padding:"5px 10px"},onBack:l},{footer:n(()=>[s(e(U),{"active-key":r.value,"onUpdate:activeKey":p[0]||(p[0]=_=>r.value=_)},{default:n(()=>[s(e(b),{key:"test",tab:"Test"}),s(e(b),{key:"settings",tab:"Settings"})]),_:1},8,["active-key"])]),extra:n(()=>[s(M),s(L,{path:e(t).form.path},null,8,["path"]),s(F,{path:"forms/overview"}),s(z,{model:e(t).form},null,8,["model"]),r.value==="settings"?(m(),i(E,{key:0,model:e(t).form},null,8,["model"])):f("",!0)]),_:1},8,["title"])):f("",!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"])):f("",!0),e(t)&&r.value==="settings"?(m(),i(I,{key:1,form:e(t).form},null,8,["form"])):f("",!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"])):f("",!0)]}),_:1}))}});export{Ae as default};
//# sourceMappingURL=FormEditor.eb697286.js.map
