import{d as g,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 v,H as C,eG as P,f as s,ew as u}from"./outputWidgets.427e9347.js";import{_ as R,a as I}from"./FormTester.vue_vue_type_script_setup_true_lang.eb861452.js";import{S as T,L as A}from"./SmartConsole.191e476a.js";import{a as S}from"./asyncComputed.32abd7c2.js";import{F as D}from"./forms.9ae53624.js";import{W as N}from"./workspaces.4100d442.js";import{_ as F}from"./SaveButton.vue_vue_type_script_setup_true_lang.a846a0dc.js";import{_ as L}from"./DocsButton.vue_vue_type_script_setup_true_lang.09beac58.js";import{_ as V}from"./LaunchButton.vue_vue_type_script_setup_true_lang.e149ae97.js";import{B as q}from"./BaseLayout.0abe2ed6.js";import{r as E}from"./executeJs.cb9756c3.js";import{_ as H}from"./Debugger.vue_vue_type_script_setup_true_lang.fec54b81.js";import{A as y,T as M}from"./TabPane.7a3514c0.js";import"./index.c41329de.js";import{c as U}from"./index.e58605b8.js";import"./FormItem.e1548cef.js";import"./Title.213e158e.js";import"./Base.dbea8db9.js";import"./transButton.470f2fe6.js";import"./FormRunner.882e8824.js";import"./index.8dcb7ead.js";import"./pubsub.9b59356e.js";import"./CircularLoading.044df273.js";import"./WidgetsFrame.e9d125d0.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.d8baf360.js";import"./icons.2a865956.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.339641a9.js";import"./index.bd024c7f.js";import"./CollapsePanel.bad9e978.js";import"./Text.31458a16.js";import"./index.36e3a141.js";import"./index.3804082b.js";import"./dashes.c44ff20c.js";import"./activeRecord.91f10272.js";import"./runnerData.f3941ca5.js";import"./hooks.4b184497.js";import"./jobs.00698289.js";import"./index.8fcd530b.js";import"./uuid.dfb0647f.js";import"./url.9044ee0d.js";import"./ant-design.484e81b9.js";import"./PlayerNavbar.a87eeb58.js";import"./Steps.e44a290d.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]="7f56b174-49ae-4068-8fbb-03ab06667948",a._sentryDebugIdIdentifier="sentry-dbid-7f56b174-49ae-4068-8fbb-03ab06667948")}catch{}})();const W=g({__name:"PreviewButton",props:{model:{}},setup(a){const o=a,f=k(),c=h(),r=()=>{const l=f.query;c.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}))}}),De=g({__name:"FormEditor",setup(a){const o=h(),f=k(),c=v(null),r=v("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}))),b=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(y),{key:"test",tab:"Test"}),s(e(y),{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"])):u("",!0)]),_:1},8,["title"])):u("",!0)]),content:n(()=>[e(t)&&r.value==="test"?(m(),i(R,{key:0,ref_key:"tester",ref:c,form:e(t).form,"log-service":e(b),onRedirect:$},null,8,["form","log-service"])):u("",!0),e(t)&&r.value==="settings"?(m(),i(I,{key:1,form:e(t).form},null,8,["form"])):u("",!0)]),footer:n(()=>{var _;return[e(t)&&r.value==="test"?(m(),i(T,{key:0,runtime:"forms","log-service":e(b),onRestart:(_=c.value)==null?void 0:_.restart},null,8,["log-service","onRestart"])):u("",!0)]}),_:1}))}});export{De as default};
//# sourceMappingURL=FormEditor.2882c80e.js.map
