import{d as b,eA as k,ez as w,b as s,c as m,w as i,aJ as h,u as e,c4 as x,r as y,f as n,ew as p,eF as $}from"./outputWidgets.5ced94d7.js";import{_ as B,a as C}from"./FormTester.vue_vue_type_script_setup_true_lang.0f2cc92d.js";import{S as I,L as P}from"./SmartConsole.2af8d0ee.js";import{a as R}from"./asyncComputed.6f213f9d.js";import{F as T}from"./forms.4a767921.js";import{W as S}from"./workspaces.2720be7e.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.5baa60de.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.b7605154.js";import{_ as F}from"./LaunchButton.vue_vue_type_script_setup_true_lang.7fd38883.js";import{B as N}from"./BaseLayout.a4af420b.js";import{A as g,T as L}from"./TabPane.d9f04984.js";import"./index.bd8df636.js";import{c as V}from"./index.2a4a437f.js";import"./Title.74cb802d.js";import"./Form.3717142f.js";import"./broker.9e31ddd3.js";import"./index.cec4fd9b.js";import"./pubsub.f395e26b.js";import"./executeJs.11b87c77.js";import"./icons.157295a5.js";import"./CircularLoading.ee1c51bf.js";import"./PlayerNavbar.82b5545a.js";import"./index.48bbb941.js";import"./Steps.e0bb8b23.js";import"./WidgetsFrame.a33f6bb5.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.fdf790e0.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.24c52910.js";import"./index.2298efd5.js";import"./CollapsePanel.3e7dc058.js";import"./index.c816332a.js";import"./index.c946e10c.js";import"./index.fe1573f2.js";import"./dashes.11209ba2.js";import"./activeRecord.6ae8bce9.js";import"./hooks.eb6be727.js";import"./jobs.b1195529.js";import"./index.d48bc6c3.js";import"./uuid.3b98222f.js";import"./url.b91ad4a3.js";import"./ant-design.49bf0c8e.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="ab5287cd-83cf-4377-abc2-3d42c9727714",r._sentryDebugIdIdentifier="sentry-dbid-ab5287cd-83cf-4377-abc2-3d42c9727714")}catch{}})();const q=b({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,c=k(),u=w(),o=()=>{const l=c.query;u.push({path:`/_editor/${a.model.routeName}/${encodeURIComponent(a.model.path)}/preview`,query:l})};return(l,t)=>(s(),m(e(x),{class:"preview-button",onClick:o},{default:i(()=>[h(" Preview ")]),_:1}))}}),Be=b({__name:"FormEditor",setup(r){const a=w(),c=k(),u=y(null),o=y("test");function l(){a.push({name:"forms"})}const{result:t}=R(()=>Promise.all([S.get(),T.get(c.params.formPath)]).then(([v,f])=>$({workspace:v,form:f}))),_=P.create();return(v,f)=>(s(),m(N,null,{navbar:i(()=>[e(t)?(s(),m(e(V),{key:0,title:e(t).form.title,style:{padding:"5px 10px"},onBack:l},{footer:i(()=>[n(e(L),{"active-key":o.value,"onUpdate:activeKey":f[0]||(f[0]=d=>o.value=d)},{default:i(()=>[n(e(g),{key:"test",tab:"Test"}),n(e(g),{key:"settings",tab:"Settings"})]),_:1},8,["active-key"])]),extra:i(()=>[n(F,{path:e(t).form.path},null,8,["path"]),n(D,{path:"forms/overview"}),n(q,{model:e(t).form},null,8,["model"]),o.value==="settings"?(s(),m(A,{key:0,model:e(t).form},null,8,["model"])):p("",!0)]),_:1},8,["title"])):p("",!0)]),content:i(()=>[e(t)&&o.value==="test"?(s(),m(B,{key:0,ref_key:"tester",ref:u,form:e(t).form,"log-service":e(_)},null,8,["form","log-service"])):p("",!0),e(t)&&o.value==="settings"?(s(),m(C,{key:1,form:e(t).form},null,8,["form"])):p("",!0)]),footer:i(()=>{var d;return[e(t)&&o.value==="test"?(s(),m(I,{key:0,runtime:"forms","log-service":e(_),onRestart:(d=u.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):p("",!0)]}),_:1}))}});export{Be as default};
//# sourceMappingURL=FormEditor.44334e38.js.map
