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.17392370.js";import{_ as $,a as x}from"./FormTester.vue_vue_type_script_setup_true_lang.7f0204a9.js";import{S as I,L as P}from"./SmartConsole.995c5bb7.js";import{a as R}from"./asyncComputed.76849272.js";import{F as T}from"./forms.cc7f6703.js";import{W as S}from"./workspaces.9a283772.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.26c691c2.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.84611838.js";import{B as F}from"./BaseLayout.b515a973.js";import{A as b,T as N}from"./TabPane.25e9ccd4.js";import"./index.bd94f307.js";import{c as L}from"./index.2e2d3a0a.js";import"./Title.bc3ff086.js";import"./Form.e398e550.js";import"./broker.a0a05ab5.js";import"./index.86e4aba0.js";import"./pubsub.fc739490.js";import"./executeJs.a0d1c16f.js";import"./icons.baa5f07a.js";import"./CircularLoading.493040c9.js";import"./PlayerNavbar.84056dff.js";import"./index.7c30bb7a.js";import"./Steps.7da7efa5.js";import"./Modal.3c911f54.js";import"./WidgetsFrame.36b12b34.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.ce89a8b9.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.6c9809c0.js";import"./index.8aa7fba2.js";import"./CollapsePanel.853dbd0d.js";import"./index.1fd97730.js";import"./index.ba0ff767.js";import"./dashes.5976f8f5.js";import"./activeRecord.84b679f6.js";import"./hooks.5364daac.js";import"./jobs.205fd41b.js";import"./index.8c91651f.js";import"./uuid.339b60bd.js";import"./ant-design.9c3ff8a2.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]="5e94cba3-f4a3-4d04-9b20-5af693a1fbe4",r._sentryDebugIdIdentifier="sentry-dbid-5e94cba3-f4a3-4d04-9b20-5af693a1fbe4")}catch{}})();const V=g({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,u=k(),f=w(),o=()=>{const c=u.query;f.push({path:`/_editor/${a.model.routeName}/${encodeURIComponent(a.model.path)}/preview`,query:c})};return(c,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(),f=y(null),o=y("test");function c(){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:c},{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:f,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=f.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):p("",!0)]}),_:1}))}});export{he as default};
//# sourceMappingURL=FormEditor.a3e99b90.js.map
