import{d as k,ez as b,ey as h,b as m,c as i,w as n,aA as x,u as e,bZ as B,r as y,H as C,eE as P,f as s,ev as u}from"./outputWidgets.0fb707c7.js";import{_ as R,a as I}from"./FormTester.vue_vue_type_script_setup_true_lang.5bb83978.js";import{S as T,L as S}from"./SmartConsole.cb276e5d.js";import{a as A}from"./asyncComputed.a0ca296c.js";import{F as D}from"./forms.d1706940.js";import{W as N}from"./workspaces.3d9f34c7.js";import{_ as E}from"./SaveButton.vue_vue_type_script_setup_true_lang.cb07d15b.js";import{_ as F}from"./DocsButton.vue_vue_type_script_setup_true_lang.6262c519.js";import{_ as L}from"./LaunchButton.vue_vue_type_script_setup_true_lang.6f6b28d7.js";import{B as V}from"./BaseLayout.4284e9c0.js";import{r as q}from"./executeJs.0928a564.js";import{_ as H}from"./Debugger.vue_vue_type_script_setup_true_lang.0be10547.js";import{A as g,T as M}from"./TabPane.52e10a91.js";import"./index.7772039f.js";import{c as U}from"./index.ebe62e37.js";import"./Title.f00a58f9.js";import"./transButton.220177fb.js";import"./Form.0dcb97c0.js";import"./FormRunner.a8fff01f.js";import"./index.4da42521.js";import"./pubsub.7d8bce56.js";import"./CircularLoading.1ef881a2.js";import"./WidgetsFrame.06b01801.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.c56900fa.js";import"./icons.24a85994.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.4cc3706c.js";import"./index.3c932b2a.js";import"./CollapsePanel.d73eca3e.js";import"./index.0d3d2205.js";import"./index.a2e845fd.js";import"./index.e8ef1073.js";import"./dashes.732fbcbe.js";import"./activeRecord.204186f3.js";import"./runnerData.123d166f.js";import"./hooks.050c60fa.js";import"./jobs.a07f20aa.js";import"./index.8dbf2994.js";import"./uuid.4028e63a.js";import"./url.d43b75f5.js";import"./ant-design.c18e1d39.js";import"./PlayerNavbar.64dd8421.js";import"./Steps.4891f1c9.js";import"./Text.3ec0a64d.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]="fa2e1278-03e1-4fa2-9074-d820a6324fd6",a._sentryDebugIdIdentifier="sentry-dbid-fa2e1278-03e1-4fa2-9074-d820a6324fd6")}catch{}})();const W=k({__name:"PreviewButton",props:{model:{}},setup(a){const o=a,f=b(),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=k({__name:"FormEditor",setup(a){const o=h(),f=b(),c=y(null),r=y("test");function l(){o.push({name:"forms"})}const{result:t,refetch:w}=A(()=>Promise.all([N.get(),D.get(f.params.formPath)]).then(([d,p])=>P({workspace:d,form:p}))),v=S.create();function $(d,p){q("editor",o,d,p)}return C(()=>f.params.formPath,()=>{w()}),(d,p)=>(m(),i(V,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(L,{path:e(t).form.path},null,8,["path"]),s(F,{path:"forms/overview"}),s(W,{model:e(t).form},null,8,["model"]),r.value==="settings"?(m(),i(E,{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(v),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(v),onRestart:(_=c.value)==null?void 0:_.restart},null,8,["log-service","onRestart"])):u("",!0)]}),_:1}))}});export{De as default};
//# sourceMappingURL=FormEditor.8e661a46.js.map
