import{d as g,eA as k,ez as w,b as a,c as m,w as i,aT as h,u as e,c9 as B,r as y,f as n,ew as p,eF as C}from"./outputWidgets.75a5b0b9.js";import{_ as T,a as $}from"./FormTester.vue_vue_type_script_setup_true_lang.58b0edd3.js";import{S as x,L as I}from"./SmartConsole.c35b14e7.js";import{a as P}from"./asyncComputed.c701d7b0.js";import{F as R}from"./forms.d6fd4b56.js";import{W as S}from"./workspaces.f47922e6.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.d3cd006c.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.0e30e393.js";import{B as F}from"./BaseLayout.324568a0.js";import{A as b,T as N}from"./TabPane.0d7849ee.js";import"./index.7aacb57f.js";import{c as L}from"./index.b50eb903.js";import"./Title.b6c9692d.js";import"./Form.2c716183.js";import"./broker.6112f7bc.js";import"./index.7a91ca2c.js";import"./pubsub.3fa240d3.js";import"./executeJs.fb1c318e.js";import"./icons.c04528be.js";import"./CircularLoading.1b6701b1.js";import"./PlayerNavbar.04a45a2a.js";import"./index.a1ee75ca.js";import"./Steps.abab7b0a.js";import"./Modal.21246413.js";import"./WidgetsFrame.fd4386d8.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.acb7988b.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.4674e54d.js";import"./index.e9ba5796.js";import"./CollapsePanel.46ee4c6b.js";import"./index.5e9c5434.js";import"./index.4598445f.js";import"./dashes.cbc2452d.js";import"./activeRecord.115270b9.js";import"./hooks.1c8a8ebc.js";import"./jobs.4af0de33.js";import"./index.9c0809a0.js";import"./uuid.6680d6a1.js";import"./ant-design.7c6678de.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]="c95b60f2-1bfe-47ef-9e3c-e0536e001625",r._sentryDebugIdIdentifier="sentry-dbid-c95b60f2-1bfe-47ef-9e3c-e0536e001625")}catch{}})();const V=g({__name:"PreviewButton",props:{model:{}},setup(r){const s=r,u=k(),c=w(),o=()=>{const f=u.query;c.push({path:`/_editor/${s.model.routeName}/${encodeURIComponent(s.model.path)}/preview`,query:f})};return(f,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 f(){s.push({name:"forms"})}const{result:t}=P(()=>Promise.all([S.get(),R.get(u.params.formPath)]).then(([v,l])=>C({workspace:v,form:l}))),_=I.create();return(v,l)=>(a(),m(F,null,{navbar:i(()=>[e(t)?(a(),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"?(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(T,{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($,{key:1,form:e(t).form},null,8,["form"])):p("",!0)]),footer:i(()=>{var d;return[e(t)&&o.value==="test"?(a(),m(x,{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.fc51868d.js.map
