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.9b7c29ed.js";import{_ as B,a as C}from"./FormTester.vue_vue_type_script_setup_true_lang.80cccc1f.js";import{S as I,L as P}from"./SmartConsole.4a9a44c1.js";import{a as R}from"./asyncComputed.6a414bed.js";import{F as T}from"./forms.d2f1a2f3.js";import{W as S}from"./workspaces.a26f4872.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.4fcf11c4.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.33d71eda.js";import{_ as F}from"./LaunchButton.vue_vue_type_script_setup_true_lang.d3882b27.js";import{B as N}from"./BaseLayout.0edd5899.js";import{A as b,T as L}from"./TabPane.40b534c7.js";import"./index.85aefca9.js";import{c as V}from"./index.530f7175.js";import"./Title.55bc3e25.js";import"./Form.77e50956.js";import"./broker.f34c2e88.js";import"./index.4bc6a49a.js";import"./pubsub.f1df5000.js";import"./executeJs.676c9df6.js";import"./icons.7c250a15.js";import"./CircularLoading.91e9cb43.js";import"./PlayerNavbar.3e459895.js";import"./index.31be9da9.js";import"./Steps.1245809b.js";import"./WidgetsFrame.cd5e6124.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.0d59629c.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.81954ce9.js";import"./index.6ac044ef.js";import"./CollapsePanel.7557b7a0.js";import"./index.b1ad1cca.js";import"./index.817f3ac7.js";import"./index.316bc1ac.js";import"./dashes.920727b6.js";import"./activeRecord.264ba54c.js";import"./hooks.146679d7.js";import"./jobs.2d5da298.js";import"./index.d8ed1958.js";import"./uuid.5cd70888.js";import"./url.c61c9940.js";import"./ant-design.9b0f163e.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]="e214e4dc-dfff-45c5-83f2-8ac15b1d84bb",r._sentryDebugIdIdentifier="sentry-dbid-e214e4dc-dfff-45c5-83f2-8ac15b1d84bb")}catch{}})();const q=g({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,f=k(),c=w(),o=()=>{const u=f.query;c.push({path:`/_editor/${a.model.routeName}/${encodeURIComponent(a.model.path)}/preview`,query:u})};return(u,t)=>(s(),m(e(x),{class:"preview-button",onClick:o},{default:i(()=>[h(" Preview ")]),_:1}))}}),Be=g({__name:"FormEditor",setup(r){const a=w(),f=k(),c=y(null),o=y("test");function u(){a.push({name:"forms"})}const{result:t}=R(()=>Promise.all([S.get(),T.get(f.params.formPath)]).then(([v,l])=>$({workspace:v,form:l}))),_=P.create();return(v,l)=>(s(),m(N,null,{navbar:i(()=>[e(t)?(s(),m(e(V),{key:0,title:e(t).form.title,style:{padding:"5px 10px"},onBack:u},{footer:i(()=>[n(e(L),{"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(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:c,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=c.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):p("",!0)]}),_:1}))}});export{Be as default};
//# sourceMappingURL=FormEditor.92220d27.js.map
