import{d as g,eA as k,ez as w,b as a,c as m,w as i,aJ as h,u as e,c4 as B,r as y,f as n,ew as p,eF as C}from"./outputWidgets.1f391ab3.js";import{_ as $,a as x}from"./FormTester.vue_vue_type_script_setup_true_lang.4a8f12c5.js";import{S as I,L as P}from"./SmartConsole.723d9a5e.js";import{a as R}from"./asyncComputed.56fb497e.js";import{F as T}from"./forms.4a257da1.js";import{W as S}from"./workspaces.2c279e1e.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.d4105557.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.78430254.js";import{B as F}from"./BaseLayout.40ae7430.js";import{A as b,T as N}from"./TabPane.49afc3f4.js";import"./index.130e9d58.js";import{c as L}from"./index.3daa08be.js";import"./Title.e19c9b7e.js";import"./Form.d88e907e.js";import"./broker.8fce289a.js";import"./index.287a17dd.js";import"./pubsub.ab26e051.js";import"./executeJs.8cf07e9e.js";import"./icons.35fd2af6.js";import"./CircularLoading.5d0ca572.js";import"./PlayerNavbar.409778ab.js";import"./index.a24e4cfd.js";import"./Steps.25a4bd32.js";import"./Modal.1885bbe2.js";import"./WidgetsFrame.33036ed2.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.da25c625.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.14d9ffa8.js";import"./index.a2705008.js";import"./CollapsePanel.ed22c9ce.js";import"./index.f0baefdd.js";import"./index.beaf06d8.js";import"./dashes.2f4042ed.js";import"./activeRecord.b9964a93.js";import"./hooks.2c35f219.js";import"./jobs.a4816fd5.js";import"./index.d09067f1.js";import"./uuid.3e4fbaa8.js";import"./ant-design.080bc381.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[s]="875814b0-b162-4845-8791-17e7430412c8",r._sentryDebugIdIdentifier="sentry-dbid-875814b0-b162-4845-8791-17e7430412c8")}catch{}})();const V=g({__name:"PreviewButton",props:{model:{}},setup(r){const s=r,u=k(),c=w(),o=()=>{const l=u.query;c.push({path:`/_editor/${s.model.routeName}/${encodeURIComponent(s.model.path)}/preview`,query:l})};return(l,t)=>(a(),m(e(B),{class:"preview-button",onClick:o},{default:i(()=>[h(" Preview ")]),_:1}))}}),he=g({__name:"FormEditor",setup(r){const s=w(),u=k(),c=y(null),o=y("test");function l(){s.push({name:"forms"})}const{result:t}=R(()=>Promise.all([S.get(),T.get(u.params.formPath)]).then(([v,f])=>C({workspace:v,form:f}))),_=P.create();return(v,f)=>(a(),m(F,null,{navbar:i(()=>[e(t)?(a(),m(e(L),{key:0,title:e(t).form.title,onBack:l},{footer:i(()=>[n(e(N),{"active-key":o.value,"onUpdate:activeKey":f[0]||(f[0]=d=>o.value=d)},{default:i(()=>[n(e(b),{key:"test",tab:"Test"}),n(e(b),{key:"settings",tab:"Settings"})]),_:1},8,["active-key"])]),extra:i(()=>[n(D,{path:"forms/overview"}),n(V,{model:e(t).form},null,8,["model"]),o.value==="settings"?(a(),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"?(a(),m($,{key:0,ref_key:"tester",ref:c,form:e(t).form,"log-service":e(_)},null,8,["form","log-service"])):p("",!0),e(t)&&o.value==="settings"?(a(),m(x,{key:1,form:e(t).form},null,8,["form"])):p("",!0)]),footer:i(()=>{var d;return[e(t)&&o.value==="test"?(a(),m(I,{key:0,runtime:"forms","log-service":e(_),onRestart:(d=c.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):p("",!0)]}),_:1}))}});export{he as default};
//# sourceMappingURL=FormEditor.e3bd7548.js.map
