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 x,r as y,f as n,ew as p,eF as $}from"./outputWidgets.300f3e96.js";import{_ as B,a as C}from"./FormTester.vue_vue_type_script_setup_true_lang.aba6b11d.js";import{S as I,L as P}from"./SmartConsole.77f4105d.js";import{a as R}from"./asyncComputed.6561fe78.js";import{F as T}from"./forms.e8d7c389.js";import{W as S}from"./workspaces.dcbbc90b.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.696d43cd.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.e478a443.js";import{_ as F}from"./LaunchButton.vue_vue_type_script_setup_true_lang.a2ab09a8.js";import{B as N}from"./BaseLayout.d72db165.js";import{A as b,T as L}from"./TabPane.17809989.js";import"./index.cda9effe.js";import{c as V}from"./index.5dabecc6.js";import"./Title.f9e3ac72.js";import"./Form.e5ad8df8.js";import"./broker.ee0dbdd1.js";import"./index.5c5a7853.js";import"./pubsub.f4c4af7d.js";import"./executeJs.e9a0877c.js";import"./icons.faa6dbaa.js";import"./CircularLoading.832063ba.js";import"./PlayerNavbar.b0e379bf.js";import"./index.4c022ec6.js";import"./Steps.a22d9e96.js";import"./WidgetsFrame.5232fd96.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.98c0f219.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.70794c6d.js";import"./index.95657637.js";import"./CollapsePanel.11538760.js";import"./index.b81953c5.js";import"./index.b49fb559.js";import"./index.c74452a7.js";import"./dashes.84ffed24.js";import"./activeRecord.6e31bcda.js";import"./hooks.33df6109.js";import"./jobs.5cb7afa3.js";import"./index.0deb6cbe.js";import"./uuid.bbce5058.js";import"./url.f346bb44.js";import"./ant-design.e9641753.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]="dd0a910f-8e92-4251-9108-f6cb0d9b301b",r._sentryDebugIdIdentifier="sentry-dbid-dd0a910f-8e92-4251-9108-f6cb0d9b301b")}catch{}})();const q=g({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,u=k(),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=g({__name:"FormEditor",setup(r){const a=w(),u=k(),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(b),{key:"test",tab:"Test"}),n(e(b),{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.09057e26.js.map
