import{d as k,ez as b,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.a4629ff8.js";import{_ as P,a as R}from"./FormTester.vue_vue_type_script_setup_true_lang.531fd201.js";import{S as T,L as S}from"./SmartConsole.c59a847e.js";import{a as D}from"./asyncComputed.fb8b9ba6.js";import{F as N}from"./forms.e81bb060.js";import{W as A}from"./workspaces.6fdb4cab.js";import{_ as E}from"./SaveButton.vue_vue_type_script_setup_true_lang.f9b0c6e4.js";import{_ as F}from"./DocsButton.vue_vue_type_script_setup_true_lang.2c6a5963.js";import{_ as L}from"./LaunchButton.vue_vue_type_script_setup_true_lang.ad89e53e.js";import{B as V}from"./BaseLayout.4a3e21df.js";import"./index.339c7421.js";import{r as q}from"./executeJs.559e86f5.js";import{_ as M}from"./Debugger.vue_vue_type_script_setup_true_lang.cf40fd84.js";import{A as g,T as U}from"./TabPane.2e2e32c9.js";import"./index.3e926dac.js";import{c as W}from"./index.dc4c5f56.js";import"./Title.cf2a531e.js";import"./Form.ab59726f.js";import"./FormRunner.332769c0.js";import"./index.cecf191d.js";import"./pubsub.25dc8c41.js";import"./CircularLoading.79e4a789.js";import"./WidgetsFrame.893465cb.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.b200fdcb.js";import"./icons.73bff2ab.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.f2becaea.js";import"./index.5b658f35.js";import"./CollapsePanel.13377319.js";import"./index.56cfba6d.js";import"./index.fda4c602.js";import"./index.48817ebe.js";import"./dashes.cd571f84.js";import"./activeRecord.a2b7d343.js";import"./runnerData.83399038.js";import"./hooks.ce0d720c.js";import"./jobs.51c1e4e4.js";import"./index.46db6cb2.js";import"./uuid.af431a29.js";import"./url.d6a620b9.js";import"./ant-design.523e8417.js";import"./PlayerNavbar.403ee6e8.js";import"./Steps.dce825a5.js";import"./Text.eb216708.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]="360f0d3c-73fa-4ae0-aac0-f33a38271287",a._sentryDebugIdIdentifier="sentry-dbid-360f0d3c-73fa-4ae0-aac0-f33a38271287")}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,t)=>(m(),i(e(B),{class:"preview-button",onClick:r},{default:n(()=>[x(" Preview ")]),_:1}))}}),Ne=k({__name:"FormEditor",setup(a){const o=h(),f=b(),u=y(null),r=y("test");function l(){o.push({name:"forms"})}const{result:t,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(()=>[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(g),{key:"test",tab:"Test"}),s(e(g),{key:"settings",tab:"Settings"})]),_:1},8,["active-key"])]),extra:n(()=>[s(M),s(L,{path:e(t).form.path},null,8,["path"]),s(F,{path:"forms/overview"}),s(z,{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(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(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{Ne as default};
//# sourceMappingURL=FormEditor.e4a1450f.js.map
