import{d as g,eB as k,eA as h,b as m,c as i,w as n,aA as x,u as e,b$ as B,r as y,H as C,eG as P,f as s,ew as f}from"./outputWidgets.562826ac.js";import{_ as R,a as I}from"./FormTester.vue_vue_type_script_setup_true_lang.46d19e95.js";import{S as T,L as A}from"./SmartConsole.cf3476b7.js";import{a as S}from"./asyncComputed.df2d9552.js";import{F as D}from"./forms.5ca19b70.js";import{W as N}from"./workspaces.5bce544b.js";import{_ as F}from"./SaveButton.vue_vue_type_script_setup_true_lang.cb63a1cf.js";import{_ as L}from"./DocsButton.vue_vue_type_script_setup_true_lang.9c0b8f6c.js";import{_ as V}from"./LaunchButton.vue_vue_type_script_setup_true_lang.2a61b72f.js";import{B as q}from"./BaseLayout.544f6749.js";import{r as E}from"./executeJs.db6ddd3b.js";import{_ as H}from"./Debugger.vue_vue_type_script_setup_true_lang.2a4a526e.js";import{A as b,T as M}from"./TabPane.84849352.js";import"./index.1d1c80e9.js";import{c as U}from"./index.ab0f4a56.js";import"./FormItem.fc4e7da8.js";import"./Title.f7aaa881.js";import"./Base.bf8dc0b1.js";import"./transButton.17480f27.js";import"./FormRunner.e2193976.js";import"./index.89e36de9.js";import"./pubsub.7185b91b.js";import"./CircularLoading.1d439fd2.js";import"./WidgetsFrame.0453e297.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.8d5d072f.js";import"./icons.63405824.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.8fca959b.js";import"./index.24f0403e.js";import"./CollapsePanel.5e649f25.js";import"./Text.712cfc26.js";import"./index.583cd440.js";import"./index.9cdd1b35.js";import"./dashes.b69dfa2c.js";import"./activeRecord.6bb1bd7f.js";import"./runnerData.52ec0396.js";import"./hooks.df04f598.js";import"./jobs.8122e83b.js";import"./index.01bf1f2c.js";import"./uuid.aae1573d.js";import"./url.5a1383d2.js";import"./ant-design.1ee2ab2c.js";import"./PlayerNavbar.bf65d008.js";import"./Steps.cad82ea8.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]="9475c36b-b952-4be8-9174-a3c2e60f81a5",a._sentryDebugIdIdentifier="sentry-dbid-9475c36b-b952-4be8-9174-a3c2e60f81a5")}catch{}})();const W=g({__name:"PreviewButton",props:{model:{}},setup(a){const o=a,c=k(),u=h(),r=()=>{const l=c.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(),c=k(),u=y(null),r=y("test");function l(){o.push({name:"forms"})}const{result:t,refetch:w}=S(()=>Promise.all([N.get(),D.get(c.params.formPath)]).then(([d,p])=>P({workspace:d,form:p}))),v=A.create();function $(d,p){E("editor",o,d,p)}return C(()=>c.params.formPath,()=>{w()}),(d,p)=>(m(),i(q,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(V,{path:e(t).form.path},null,8,["path"]),s(L,{path:"forms/overview"}),s(W,{model:e(t).form},null,8,["model"]),r.value==="settings"?(m(),i(F,{key:0,model:e(t).form},null,8,["model"])):f("",!0)]),_:1},8,["title"])):f("",!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"])):f("",!0),e(t)&&r.value==="settings"?(m(),i(I,{key:1,form:e(t).form},null,8,["form"])):f("",!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"])):f("",!0)]}),_:1}))}});export{De as default};
//# sourceMappingURL=FormEditor.257ebfc7.js.map
