import{d as k,ez as b,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.397b3720.js";import{_ as P,a as R}from"./FormTester.vue_vue_type_script_setup_true_lang.31bd3565.js";import{S as T,L as S}from"./SmartConsole.b1e4cb7e.js";import{a as D}from"./asyncComputed.28fc9d36.js";import{F as N}from"./forms.d18d2f2f.js";import{W as A}from"./workspaces.d5f1211a.js";import{_ as E}from"./SaveButton.vue_vue_type_script_setup_true_lang.004d0186.js";import{_ as F}from"./DocsButton.vue_vue_type_script_setup_true_lang.b76c2b76.js";import{_ as L}from"./LaunchButton.vue_vue_type_script_setup_true_lang.3ba9dded.js";import{B as V}from"./BaseLayout.a83edf4c.js";import"./index.06276212.js";import{r as q}from"./executeJs.1a09d42d.js";import{A as g,T as M}from"./TabPane.9487729b.js";import"./index.8a1688b5.js";import{c as U}from"./index.65a47e55.js";import"./Title.382247fb.js";import"./Form.5ce50c8f.js";import"./broker.4f667fb7.js";import"./index.9ea8c44d.js";import"./pubsub.fe0f0397.js";import"./CircularLoading.2c694ce3.js";import"./WidgetsFrame.cb4cea4e.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.0b212a8d.js";import"./icons.5e65f599.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.4d81e244.js";import"./index.d2e48d33.js";import"./CollapsePanel.fc6c100b.js";import"./index.71272f89.js";import"./index.40ca2e79.js";import"./index.e12747aa.js";import"./dashes.ba5de5ab.js";import"./activeRecord.6bb6b853.js";import"./runnerData.e0501241.js";import"./hooks.62ea9eb4.js";import"./jobs.afb91f3b.js";import"./index.c9ea7155.js";import"./uuid.365a94b6.js";import"./url.53bc193a.js";import"./ant-design.29edbf4a.js";import"./PlayerNavbar.0fa53bf9.js";import"./Steps.85b9af0a.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]="323c729f-82cf-4ea6-ac75-0755269e9fce",a._sentryDebugIdIdentifier="sentry-dbid-323c729f-82cf-4ea6-ac75-0755269e9fce")}catch{}})();const W=k({__name:"PreviewButton",props:{model:{}},setup(a){const o=a,c=b(),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=k({__name:"FormEditor",setup(a){const o=h(),c=b(),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(g),{key:"test",tab:"Test"}),p(e(g),{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.9259ff23.js.map
