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.f120b477.js";import{_ as B,a as C}from"./FormTester.vue_vue_type_script_setup_true_lang.de0067f4.js";import{S as I,L as P}from"./SmartConsole.8f4d2d35.js";import{a as R}from"./asyncComputed.5ccd4614.js";import{F as T}from"./forms.bee52afe.js";import{W as S}from"./workspaces.901e1f01.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.4077bfd8.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.a4b61028.js";import{_ as F}from"./LaunchButton.vue_vue_type_script_setup_true_lang.8555cab4.js";import{B as N}from"./BaseLayout.90c0229e.js";import{A as g,T as L}from"./TabPane.5ad7b86d.js";import"./index.d5a88f81.js";import{c as V}from"./index.2ac0b4db.js";import"./Title.3dc4e32d.js";import"./Form.ec892c10.js";import"./broker.1fed166c.js";import"./index.662a67e5.js";import"./pubsub.4681462f.js";import"./executeJs.92438dd0.js";import"./icons.c367c256.js";import"./CircularLoading.cab9f9eb.js";import"./PlayerNavbar.a0c4b479.js";import"./index.5818bfb2.js";import"./Steps.114fc919.js";import"./WidgetsFrame.54753673.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.3383c9db.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.7aeb7be4.js";import"./index.47cea170.js";import"./CollapsePanel.a5b374bc.js";import"./index.0f18085a.js";import"./index.de46e6db.js";import"./index.54e8798a.js";import"./dashes.4d7eaf1c.js";import"./activeRecord.d87d7ef2.js";import"./hooks.a815f30a.js";import"./jobs.ec327d00.js";import"./index.3801d49d.js";import"./uuid.c40ca677.js";import"./url.8af07297.js";import"./ant-design.13a5e655.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]="94af599d-fb66-4256-92ed-886eefcd958c",r._sentryDebugIdIdentifier="sentry-dbid-94af599d-fb66-4256-92ed-886eefcd958c")}catch{}})();const q=b({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,f=k(),u=w(),o=()=>{const c=f.query;u.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}))}}),Be=b({__name:"FormEditor",setup(r){const a=w(),f=k(),u=y(null),o=y("test");function c(){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:c},{footer:i(()=>[n(e(L),{"active-key":o.value,"onUpdate:activeKey":l[0]||(l[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.4f4da93a.js.map
