import{d as g,ez as k,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 c}from"./outputWidgets.24bc53e6.js";import{_ as R,a as I}from"./FormTester.vue_vue_type_script_setup_true_lang.e3d1b121.js";import{S as T,L as S}from"./SmartConsole.31c75568.js";import{a as A}from"./asyncComputed.e4b96939.js";import{F as D}from"./forms.67d54833.js";import{W as N}from"./workspaces.81cdf281.js";import{_ as E}from"./SaveButton.vue_vue_type_script_setup_true_lang.a4cb36cd.js";import{_ as F}from"./DocsButton.vue_vue_type_script_setup_true_lang.4b5f8765.js";import{_ as L}from"./LaunchButton.vue_vue_type_script_setup_true_lang.c49b1fc2.js";import{B as V}from"./BaseLayout.5b763e9c.js";import{r as q}from"./executeJs.0542559e.js";import{_ as H}from"./Debugger.vue_vue_type_script_setup_true_lang.c83042b3.js";import{A as b,T as M}from"./TabPane.c8538b54.js";import"./index.569c5333.js";import{c as U}from"./index.eba97539.js";import"./Title.d959e45a.js";import"./transButton.082aab94.js";import"./Form.026abd8d.js";import"./FormRunner.c08af26d.js";import"./index.0389f257.js";import"./pubsub.6b8c4d65.js";import"./CircularLoading.0071e96c.js";import"./WidgetsFrame.d0ec067c.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.dfb97d9e.js";import"./icons.346b8028.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.80de7e6e.js";import"./index.44c45a54.js";import"./CollapsePanel.65857923.js";import"./index.b19c9d88.js";import"./index.d2b2175c.js";import"./index.4b05c792.js";import"./dashes.4af1e6b4.js";import"./activeRecord.7f48ce0d.js";import"./runnerData.3021bf76.js";import"./hooks.e39e9595.js";import"./jobs.7e4ad3f1.js";import"./index.3a0ced65.js";import"./uuid.2f7a2235.js";import"./url.12ca99c5.js";import"./ant-design.3bddf1a0.js";import"./PlayerNavbar.46e6d61e.js";import"./Steps.4f8080d9.js";import"./Text.9efc0467.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]="203889b2-8513-42f6-b38c-727ef67af05d",a._sentryDebugIdIdentifier="sentry-dbid-203889b2-8513-42f6-b38c-727ef67af05d")}catch{}})();const W=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}=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(b),{key:"test",tab:"Test"}),s(e(b),{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"])):c("",!0)]),_:1},8,["title"])):c("",!0)]),content:n(()=>[e(t)&&r.value==="test"?(m(),i(R,{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(I,{key:1,form:e(t).form},null,8,["form"])):c("",!0)]),footer:n(()=>{var _;return[e(t)&&r.value==="test"?(m(),i(T,{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.96c90164.js.map
