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 v,f as n,ew as p,eF as $}from"./outputWidgets.ec044eb8.js";import{_ as B,a as C}from"./FormTester.vue_vue_type_script_setup_true_lang.37079b2b.js";import{S as I,L as P}from"./SmartConsole.465b88e6.js";import{a as R}from"./asyncComputed.70e28ece.js";import{F as T}from"./forms.f110dabf.js";import{W as S}from"./workspaces.b17a6d0e.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.c4f118cc.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.75cdce33.js";import{_ as F}from"./LaunchButton.vue_vue_type_script_setup_true_lang.b8e4d765.js";import{B as N}from"./BaseLayout.8ae9d39e.js";import{A as y,T as L}from"./TabPane.e94c4a37.js";import"./index.eec43ab6.js";import{c as V}from"./index.10d6c7c5.js";import"./Title.85fa9137.js";import"./Form.316ac787.js";import"./broker.40d04b6b.js";import"./index.f7c9d8bb.js";import"./pubsub.33b79e26.js";import"./executeJs.bd844f45.js";import"./icons.a554ebda.js";import"./CircularLoading.fd7c6289.js";import"./PlayerNavbar.ca5aac82.js";import"./index.6e43b5b9.js";import"./Steps.bcfd1c82.js";import"./Modal.82a5a171.js";import"./WidgetsFrame.27568d20.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.a4950b2a.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.cf37b4c9.js";import"./index.c65f55f5.js";import"./CollapsePanel.8e659084.js";import"./index.1a867dcf.js";import"./index.cd569242.js";import"./index.185a1704.js";import"./dashes.e0b0def7.js";import"./activeRecord.eb528dd4.js";import"./hooks.145c1403.js";import"./jobs.8fb07b74.js";import"./index.d97f12e1.js";import"./uuid.7d798e0e.js";import"./url.a1da359b.js";import"./ant-design.50ece8f6.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]="b00f3e42-884e-4515-a47e-91ab0bbc6b3b",r._sentryDebugIdIdentifier="sentry-dbid-b00f3e42-884e-4515-a47e-91ab0bbc6b3b")}catch{}})();const q=g({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,u=k(),l=w(),o=()=>{const c=u.query;l.push({path:`/_editor/${a.model.routeName}/${encodeURIComponent(a.model.path)}/preview`,query:c})};return(c,t)=>(s(),m(e(x),{class:"preview-button",onClick:o},{default:i(()=>[h(" Preview ")]),_:1}))}}),Ce=g({__name:"FormEditor",setup(r){const a=w(),u=k(),l=v(null),o=v("test");function c(){a.push({name:"forms"})}const{result:t}=R(()=>Promise.all([S.get(),T.get(u.params.formPath)]).then(([b,f])=>$({workspace:b,form:f}))),_=P.create();return(b,f)=>(s(),m(N,null,{navbar:i(()=>[e(t)?(s(),m(e(V),{key:0,title:e(t).form.title,style:{padding:"5px 10px"},onBack:c},{footer:i(()=>[n(e(L),{"active-key":o.value,"onUpdate:activeKey":f[0]||(f[0]=d=>o.value=d)},{default:i(()=>[n(e(y),{key:"test",tab:"Test"}),n(e(y),{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:l,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=l.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):p("",!0)]}),_:1}))}});export{Ce as default};
//# sourceMappingURL=FormEditor.3238234f.js.map
