import{d as g,ez as k,ey as h,b as s,c as m,w as i,aI as $,u as e,c0 as B,r as v,J as C,f as p,ev as u,eE as I}from"./outputWidgets.d5738148.js";import{_ as P,a as R}from"./FormTester.vue_vue_type_script_setup_true_lang.15764926.js";import{S as T,L as S}from"./SmartConsole.52e656a6.js";import{a as D}from"./asyncComputed.5b25749a.js";import{F as N}from"./forms.e581133c.js";import{W as A}from"./workspaces.18bd05b5.js";import{_ as E}from"./SaveButton.vue_vue_type_script_setup_true_lang.4babfe01.js";import{_ as F}from"./DocsButton.vue_vue_type_script_setup_true_lang.1e4e7f85.js";import{_ as L}from"./LaunchButton.vue_vue_type_script_setup_true_lang.f5ec7c9d.js";import{B as V}from"./BaseLayout.f9b3a861.js";import"./index.f7210413.js";import{r as q}from"./executeJs.7701c632.js";import{A as y,T as M}from"./TabPane.ee7b48d1.js";import"./index.39f92574.js";import{c as U}from"./index.78151aa2.js";import"./Title.69748959.js";import"./Form.45dee1c8.js";import"./broker.13330b24.js";import"./index.b4b079b2.js";import"./pubsub.601f5d35.js";import"./CircularLoading.7d41f8aa.js";import"./WidgetsFrame.d47dcf2d.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.5ae67e20.js";import"./icons.fc57d5d6.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.63577b38.js";import"./index.64ab1453.js";import"./CollapsePanel.eedcf735.js";import"./index.3bddf189.js";import"./index.ffe76733.js";import"./index.faad752e.js";import"./dashes.2209d5c8.js";import"./activeRecord.bb15dfc5.js";import"./runnerData.25a438f3.js";import"./hooks.52b998fc.js";import"./jobs.a31f38f7.js";import"./index.2791d1cb.js";import"./uuid.9ae4bd37.js";import"./url.d1f492ee.js";import"./ant-design.5238fdc0.js";import"./PlayerNavbar.587adb29.js";import"./Steps.5066fe0f.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]="4026b770-8c0b-4818-a24e-88b2e9372beb",a._sentryDebugIdIdentifier="sentry-dbid-4026b770-8c0b-4818-a24e-88b2e9372beb")}catch{}})();const W=g({__name:"PreviewButton",props:{model:{}},setup(a){const o=a,c=k(),f=h(),r=()=>{const l=c.query;f.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=g({__name:"FormEditor",setup(a){const o=h(),c=k(),f=v(null),r=v("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}))),b=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(y),{key:"test",tab:"Test"}),p(e(y),{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"])):u("",!0)]),_:1},8,["title"])):u("",!0)]),content:i(()=>[e(t)&&r.value==="test"?(s(),m(P,{key:0,ref_key:"tester",ref:f,form:e(t).form,"log-service":e(b),onRedirect:x},null,8,["form","log-service"])):u("",!0),e(t)&&r.value==="settings"?(s(),m(R,{key:1,form:e(t).form},null,8,["form"])):u("",!0)]),footer:i(()=>{var _;return[e(t)&&r.value==="test"?(s(),m(T,{key:0,runtime:"forms","log-service":e(b),onRestart:(_=f.value)==null?void 0:_.restart},null,8,["log-service","onRestart"])):u("",!0)]}),_:1}))}});export{Te as default};
//# sourceMappingURL=FormEditor.8cda991c.js.map
