import{d as b,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.df0b7764.js";import{_ as B,a as C}from"./FormTester.vue_vue_type_script_setup_true_lang.0aefa459.js";import{S as I,L as P}from"./SmartConsole.c7a81284.js";import{a as R}from"./asyncComputed.46396f29.js";import{F as T}from"./forms.fe843e69.js";import{W as S}from"./workspaces.3593d617.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.3b3cc322.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.45399517.js";import{_ as F}from"./LaunchButton.vue_vue_type_script_setup_true_lang.c7e321fb.js";import{B as N}from"./BaseLayout.2f5857c5.js";import{A as g,T as L}from"./TabPane.54a94f83.js";import"./index.bfb2617c.js";import{c as V}from"./index.ff998eb1.js";import"./Title.d627f1f5.js";import"./Form.29bcac3f.js";import"./broker.83cb95a9.js";import"./index.52f87cef.js";import"./pubsub.82647744.js";import"./executeJs.ce7b3245.js";import"./icons.649962e7.js";import"./CircularLoading.43a277ec.js";import"./PlayerNavbar.756a1cc1.js";import"./index.8131d28d.js";import"./Steps.cb980244.js";import"./WidgetsFrame.d2e169f5.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.eac698ad.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.2b57bf3c.js";import"./index.54e26211.js";import"./CollapsePanel.1b17f2cb.js";import"./index.004a66c2.js";import"./index.5c49f4fd.js";import"./index.317ac553.js";import"./dashes.27a2359d.js";import"./activeRecord.af31c98a.js";import"./hooks.e33124b6.js";import"./jobs.7cde33de.js";import"./index.b2e095c7.js";import"./uuid.29060192.js";import"./url.b34e96a5.js";import"./ant-design.3dd40e2b.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]="66298d73-9190-4de0-b696-6cbadc8eecc4",r._sentryDebugIdIdentifier="sentry-dbid-66298d73-9190-4de0-b696-6cbadc8eecc4")}catch{}})();const q=b({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,c=k(),u=w(),o=()=>{const l=c.query;u.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=b({__name:"FormEditor",setup(r){const a=w(),c=k(),u=y(null),o=y("test");function l(){a.push({name:"forms"})}const{result:t}=R(()=>Promise.all([S.get(),T.get(c.params.formPath)]).then(([v,f])=>$({workspace:v,form:f}))),_=P.create();return(v,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:l},{footer:i(()=>[n(e(L),{"active-key":o.value,"onUpdate:activeKey":f[0]||(f[0]=d=>o.value=d)},{default:i(()=>[n(e(g),{key:"test",tab:"Test"}),n(e(g),{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:u,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=u.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):p("",!0)]}),_:1}))}});export{Be as default};
//# sourceMappingURL=FormEditor.af212ec3.js.map
