import{d as g,ez as k,ey as h,b as m,c as i,w as n,aI as x,u as e,c0 as B,r as y,J as C,eE as I,f as s,ev as c}from"./outputWidgets.1739e6b5.js";import{_ as P,a as R}from"./FormTester.vue_vue_type_script_setup_true_lang.358cdb2b.js";import{_ as T,S,L as D}from"./Debugger.vue_vue_type_script_setup_true_lang.8a10c449.js";import{a as N}from"./asyncComputed.b4d87a94.js";import{F as A}from"./forms.109d1b54.js";import{W as E}from"./workspaces.cad93b01.js";import{_ as F}from"./SaveButton.vue_vue_type_script_setup_true_lang.70064dca.js";import{_ as L}from"./DocsButton.vue_vue_type_script_setup_true_lang.c5192ab8.js";import{_ as V}from"./LaunchButton.vue_vue_type_script_setup_true_lang.33349e54.js";import{B as q}from"./BaseLayout.afdc77f1.js";import"./index.92715e30.js";import{r as M}from"./executeJs.3af85407.js";import{A as b,T as U}from"./TabPane.80dc2dd6.js";import"./index.b95c3c00.js";import{c as W}from"./index.ef7ab7ff.js";import"./Title.1261c75a.js";import"./Form.6a4829ad.js";import"./FormRunner.c57e1a19.js";import"./index.3da0fea7.js";import"./pubsub.e4395938.js";import"./CircularLoading.67a69d9a.js";import"./WidgetsFrame.88941503.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.56b61238.js";import"./icons.1c3e2bde.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.a3a28f81.js";import"./index.441487c0.js";import"./CollapsePanel.34a522a0.js";import"./index.55ff2de5.js";import"./index.fbff59b3.js";import"./index.663f575e.js";import"./dashes.3d94d969.js";import"./activeRecord.55a23e4a.js";import"./runnerData.f7d9251a.js";import"./hooks.877c6925.js";import"./jobs.7d056170.js";import"./index.8b3d4030.js";import"./uuid.5051bed8.js";import"./Text.f4c0ef3e.js";import"./url.8bddfe76.js";import"./ant-design.6ecbca2a.js";import"./PlayerNavbar.9236d56f.js";import"./Steps.bfd262de.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]="5df492bf-fdea-4948-895b-c2825b42a377",a._sentryDebugIdIdentifier="sentry-dbid-5df492bf-fdea-4948-895b-c2825b42a377")}catch{}})();const z=g({__name:"PreviewButton",props:{model:{}},setup(a){const o=a,f=k(),u=h(),r=()=>{const l=f.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}))}}),De=g({__name:"FormEditor",setup(a){const o=h(),f=k(),u=y(null),r=y("test");function l(){o.push({name:"forms"})}const{result:t,refetch:w}=N(()=>Promise.all([E.get(),A.get(f.params.formPath)]).then(([d,p])=>I({workspace:d,form:p}))),v=D.create();function $(d,p){M("editor",o,d,p)}return C(()=>f.params.formPath,()=>{w()}),(d,p)=>(m(),i(q,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(T),s(V,{path:e(t).form.path},null,8,["path"]),s(L,{path:"forms/overview"}),s(z,{model:e(t).form},null,8,["model"]),r.value==="settings"?(m(),i(F,{key:0,model:e(t).form},null,8,["model"])):c("",!0)]),_:1},8,["title"])):c("",!0)]),content:n(()=>[e(t)&&r.value==="test"?(m(),i(P,{key:0,ref_key:"tester",ref:u,form:e(t).form,"log-service":e(v),onRedirect:$},null,8,["form","log-service"])):c("",!0),e(t)&&r.value==="settings"?(m(),i(R,{key:1,form:e(t).form},null,8,["form"])):c("",!0)]),footer:n(()=>{var _;return[e(t)&&r.value==="test"?(m(),i(S,{key:0,runtime:"forms","log-service":e(v),onRestart:(_=u.value)==null?void 0:_.restart},null,8,["log-service","onRestart"])):c("",!0)]}),_:1}))}});export{De as default};
//# sourceMappingURL=FormEditor.24326588.js.map
