import{d as k,ez as b,ey as h,b as m,c as i,w as n,aI as x,u as t,c0 as B,r as y,J as C,eE as I,f as s,ev as c}from"./outputWidgets.a8447bcb.js";import{_ as P,a as R}from"./FormTester.vue_vue_type_script_setup_true_lang.9813c36e.js";import{S as T,L as S}from"./SmartConsole.1a7a902f.js";import{a as D}from"./asyncComputed.6c2627ea.js";import{F as N}from"./forms.2a06fab8.js";import{W as A}from"./workspaces.11e30eec.js";import{_ as E}from"./SaveButton.vue_vue_type_script_setup_true_lang.183ff268.js";import{_ as F}from"./DocsButton.vue_vue_type_script_setup_true_lang.e2056d48.js";import{_ as L}from"./LaunchButton.vue_vue_type_script_setup_true_lang.573a790d.js";import{B as V}from"./BaseLayout.f14ed0a1.js";import"./index.41d49230.js";import{r as q}from"./executeJs.3e96a194.js";import{_ as M}from"./Debugger.vue_vue_type_script_setup_true_lang.f3cfaf7f.js";import{A as g,T as U}from"./TabPane.628602f8.js";import"./index.4f57d29a.js";import{c as W}from"./index.251d2c0f.js";import"./Title.4127a4b4.js";import"./transButton.26020e2e.js";import"./Form.a869b3cf.js";import"./FormRunner.23f49269.js";import"./index.2a4fee23.js";import"./pubsub.3b516de1.js";import"./CircularLoading.dad4a96a.js";import"./WidgetsFrame.bdf0225c.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.d6301ba5.js";import"./icons.6de7af10.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.75368518.js";import"./index.3a82e58a.js";import"./CollapsePanel.5153ab25.js";import"./index.71f713cd.js";import"./index.5fa32c06.js";import"./index.ee9a096e.js";import"./dashes.d6e52b47.js";import"./activeRecord.52c1b6f8.js";import"./runnerData.64650392.js";import"./hooks.9f2c5143.js";import"./jobs.0e97b322.js";import"./index.823e1eed.js";import"./uuid.219059f6.js";import"./url.0a1547fb.js";import"./ant-design.1bcd10c9.js";import"./PlayerNavbar.3fda994a.js";import"./Steps.d0eba6f1.js";import"./Text.722e2789.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]="8224d3ac-5332-468d-9f46-65027a96320f",a._sentryDebugIdIdentifier="sentry-dbid-8224d3ac-5332-468d-9f46-65027a96320f")}catch{}})();const z=k({__name:"PreviewButton",props:{model:{}},setup(a){const o=a,f=b(),u=h(),r=()=>{const l=f.query;u.push({path:`/_editor/${o.model.routeName}/${encodeURIComponent(o.model.path)}/preview`,query:l})};return(l,e)=>(m(),i(t(B),{class:"preview-button",onClick:r},{default:n(()=>[x(" Preview ")]),_:1}))}}),At=k({__name:"FormEditor",setup(a){const o=h(),f=b(),u=y(null),r=y("test");function l(){o.push({name:"forms"})}const{result:e,refetch:w}=D(()=>Promise.all([A.get(),N.get(f.params.formPath)]).then(([d,p])=>I({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(()=>[t(e)?(m(),i(t(W),{key:0,title:t(e).form.title,style:{padding:"5px 10px"},onBack:l},{footer:n(()=>[s(t(U),{"active-key":r.value,"onUpdate:activeKey":p[0]||(p[0]=_=>r.value=_)},{default:n(()=>[s(t(g),{key:"test",tab:"Test"}),s(t(g),{key:"settings",tab:"Settings"})]),_:1},8,["active-key"])]),extra:n(()=>[s(M),s(L,{path:t(e).form.path},null,8,["path"]),s(F,{path:"forms/overview"}),s(z,{model:t(e).form},null,8,["model"]),r.value==="settings"?(m(),i(E,{key:0,model:t(e).form},null,8,["model"])):c("",!0)]),_:1},8,["title"])):c("",!0)]),content:n(()=>[t(e)&&r.value==="test"?(m(),i(P,{key:0,ref_key:"tester",ref:u,form:t(e).form,"log-service":t(v),onRedirect:$},null,8,["form","log-service"])):c("",!0),t(e)&&r.value==="settings"?(m(),i(R,{key:1,form:t(e).form},null,8,["form"])):c("",!0)]),footer:n(()=>{var _;return[t(e)&&r.value==="test"?(m(),i(T,{key:0,runtime:"forms","log-service":t(v),onRestart:(_=u.value)==null?void 0:_.restart},null,8,["log-service","onRestart"])):c("",!0)]}),_:1}))}});export{At as default};
//# sourceMappingURL=FormEditor.0b81c43f.js.map
