import{d as g,eA as k,ez as w,b as s,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.c072fe4e.js";import{_ as $,a as x}from"./FormTester.vue_vue_type_script_setup_true_lang.91f279fa.js";import{S as I,L as P}from"./SmartConsole.9d135bfd.js";import{a as R}from"./asyncComputed.376cdc00.js";import{F as T}from"./forms.db17259c.js";import{W as S}from"./workspaces.921d369d.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.1e48280b.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.afcf6cfa.js";import{B as F}from"./BaseLayout.bdaed231.js";import{A as b,T as N}from"./TabPane.df5f41ca.js";import"./index.8ab39784.js";import{c as L}from"./index.d808811c.js";import"./Title.e3dcb8ea.js";import"./Form.9f52866c.js";import"./broker.edfeca40.js";import"./index.ad809a50.js";import"./pubsub.98ad9fe0.js";import"./executeJs.9d1a076f.js";import"./icons.158b4825.js";import"./CircularLoading.1db5d4d0.js";import"./PlayerNavbar.26f9089b.js";import"./index.00103e26.js";import"./Steps.1df0e634.js";import"./Modal.dfafcf8c.js";import"./WidgetsFrame.6a9a3802.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.abbded52.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.3c5367b5.js";import"./index.c5fd7926.js";import"./CollapsePanel.ecfd8c73.js";import"./index.e7c5574b.js";import"./index.ec8e038a.js";import"./dashes.6f548a30.js";import"./activeRecord.fdc25b97.js";import"./hooks.bc826a67.js";import"./jobs.50b17e33.js";import"./index.2e3640f1.js";import"./uuid.d605f964.js";import"./ant-design.5cb2a38e.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]="19f82103-ac21-478c-a906-6f4814dbdaba",r._sentryDebugIdIdentifier="sentry-dbid-19f82103-ac21-478c-a906-6f4814dbdaba")}catch{}})();const V=g({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,u=k(),c=w(),o=()=>{const f=u.query;c.push({path:`/_editor/${a.model.routeName}/${encodeURIComponent(a.model.path)}/preview`,query:f})};return(f,t)=>(s(),m(e(B),{class:"preview-button",onClick:o},{default:i(()=>[h(" Preview ")]),_:1}))}}),he=g({__name:"FormEditor",setup(r){const a=w(),u=k(),c=y(null),o=y("test");function f(){a.push({name:"forms"})}const{result:t}=R(()=>Promise.all([S.get(),T.get(u.params.formPath)]).then(([v,l])=>C({workspace:v,form:l}))),_=P.create();return(v,l)=>(s(),m(F,null,{navbar:i(()=>[e(t)?(s(),m(e(L),{key:0,title:e(t).form.title,onBack:f},{footer:i(()=>[n(e(N),{"active-key":o.value,"onUpdate:activeKey":l[0]||(l[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"?(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($,{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"?(s(),m(x,{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=c.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):p("",!0)]}),_:1}))}});export{he as default};
//# sourceMappingURL=FormEditor.8f6e2d9e.js.map
