import{d as k,eA as b,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.dcbaec6c.js";import{_ as B,a as C}from"./FormTester.vue_vue_type_script_setup_true_lang.6d206983.js";import{S as I,L as P}from"./SmartConsole.02ad3457.js";import{a as R}from"./asyncComputed.05eefdbd.js";import{F as T}from"./forms.71227c25.js";import{W as S}from"./workspaces.afe95fae.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.9935a71b.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.54ee9498.js";import{_ as F}from"./LaunchButton.vue_vue_type_script_setup_true_lang.5644acc5.js";import{B as N}from"./BaseLayout.7aa9f430.js";import{A as g,T as L}from"./TabPane.fc42b1c2.js";import"./index.506d5447.js";import{c as V}from"./index.3c7c5d6b.js";import"./Title.137468a8.js";import"./Form.94b2db91.js";import"./broker.d63d8af1.js";import"./index.1b0d4b17.js";import"./pubsub.999268d8.js";import"./executeJs.2ae0ce97.js";import"./icons.eaf14b7d.js";import"./CircularLoading.e9015f16.js";import"./PlayerNavbar.29807a52.js";import"./index.678801af.js";import"./Steps.900c6b2c.js";import"./WidgetsFrame.63b8af8d.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.e44f814c.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.c01f25c4.js";import"./index.f596a2af.js";import"./CollapsePanel.1830ea80.js";import"./index.a2b43efb.js";import"./index.87a757a5.js";import"./index.a56c5205.js";import"./dashes.55e540d6.js";import"./activeRecord.d9292c93.js";import"./hooks.02c70748.js";import"./jobs.8d7f79b7.js";import"./index.12134aed.js";import"./uuid.474712e6.js";import"./url.5c03711e.js";import"./ant-design.f602ec67.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]="55694d8f-4ee7-42e8-97fa-5826c1d16186",r._sentryDebugIdIdentifier="sentry-dbid-55694d8f-4ee7-42e8-97fa-5826c1d16186")}catch{}})();const q=k({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,u=b(),f=w(),o=()=>{const l=u.query;f.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=k({__name:"FormEditor",setup(r){const a=w(),u=b(),f=y(null),o=y("test");function l(){a.push({name:"forms"})}const{result:t}=R(()=>Promise.all([S.get(),T.get(u.params.formPath)]).then(([v,c])=>$({workspace:v,form:c}))),_=P.create();return(v,c)=>(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":c[0]||(c[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:f,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=f.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):p("",!0)]}),_:1}))}});export{Be as default};
//# sourceMappingURL=FormEditor.d3af3d3d.js.map
