import{d as g,ez as k,ey as h,b as s,c as m,w as i,aI as $,u as e,c0 as B,r as y,J as C,f as p,ev as f,eE as I}from"./outputWidgets.8be138ba.js";import{_ as P,a as R}from"./FormTester.vue_vue_type_script_setup_true_lang.2a6794b5.js";import{S as T,L as S}from"./SmartConsole.8b980989.js";import{a as D}from"./asyncComputed.96c9ad3b.js";import{F as N}from"./forms.435a25a3.js";import{W as A}from"./workspaces.69791308.js";import{_ as E}from"./SaveButton.vue_vue_type_script_setup_true_lang.c3b85166.js";import{_ as F}from"./DocsButton.vue_vue_type_script_setup_true_lang.425c079f.js";import{_ as L}from"./LaunchButton.vue_vue_type_script_setup_true_lang.ab9ea415.js";import{B as V}from"./BaseLayout.7e0231be.js";import"./index.0df733bd.js";import{r as q}from"./executeJs.a2388ef7.js";import{A as b,T as M}from"./TabPane.03183a8f.js";import"./index.25823604.js";import{c as U}from"./index.7e655723.js";import"./Title.12e8916a.js";import"./Form.7b75db7b.js";import"./broker.d9876e48.js";import"./index.0ddca516.js";import"./pubsub.e324f67c.js";import"./CircularLoading.cf86604f.js";import"./WidgetsFrame.f9824c58.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.a9ed250b.js";import"./icons.35976e57.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.d90a4e55.js";import"./index.f0b80fab.js";import"./CollapsePanel.cd9ccb4b.js";import"./index.ea292f7a.js";import"./index.d11a75f6.js";import"./index.568a8efe.js";import"./dashes.e479dfed.js";import"./activeRecord.f6cce158.js";import"./runnerData.48ddf2c0.js";import"./hooks.f815923f.js";import"./jobs.abbd52e0.js";import"./index.bc7e7ec9.js";import"./uuid.3f13542a.js";import"./url.ebe1e528.js";import"./ant-design.e9f581dc.js";import"./PlayerNavbar.5ba0f10b.js";import"./Steps.6d828d9e.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[o]="47ca8e6b-83c6-48fd-9b4b-7dc61758a752",a._sentryDebugIdIdentifier="sentry-dbid-47ca8e6b-83c6-48fd-9b4b-7dc61758a752")}catch{}})();const W=g({__name:"PreviewButton",props:{model:{}},setup(a){const o=a,c=k(),u=h(),r=()=>{const l=c.query;u.push({path:`/_editor/${o.model.routeName}/${encodeURIComponent(o.model.path)}/preview`,query:l})};return(l,t)=>(s(),m(e(B),{class:"preview-button",onClick:r},{default:i(()=>[$(" Preview ")]),_:1}))}}),Te=g({__name:"FormEditor",setup(a){const o=h(),c=k(),u=y(null),r=y("test");function l(){o.push({name:"forms"})}const{result:t,refetch:w}=D(()=>Promise.all([A.get(),N.get(c.params.formPath)]).then(([d,n])=>I({workspace:d,form:n}))),v=S.create();function x(d,n){q("editor",o,d,n)}return C(()=>c.params.formPath,()=>{w()}),(d,n)=>(s(),m(V,null,{navbar:i(()=>[e(t)?(s(),m(e(U),{key:0,title:e(t).form.title,style:{padding:"5px 10px"},onBack:l},{footer:i(()=>[p(e(M),{"active-key":r.value,"onUpdate:activeKey":n[0]||(n[0]=_=>r.value=_)},{default:i(()=>[p(e(b),{key:"test",tab:"Test"}),p(e(b),{key:"settings",tab:"Settings"})]),_:1},8,["active-key"])]),extra:i(()=>[p(L,{path:e(t).form.path},null,8,["path"]),p(F,{path:"forms/overview"}),p(W,{model:e(t).form},null,8,["model"]),r.value==="settings"?(s(),m(E,{key:0,model:e(t).form},null,8,["model"])):f("",!0)]),_:1},8,["title"])):f("",!0)]),content:i(()=>[e(t)&&r.value==="test"?(s(),m(P,{key:0,ref_key:"tester",ref:u,form:e(t).form,"log-service":e(v),onRedirect:x},null,8,["form","log-service"])):f("",!0),e(t)&&r.value==="settings"?(s(),m(R,{key:1,form:e(t).form},null,8,["form"])):f("",!0)]),footer:i(()=>{var _;return[e(t)&&r.value==="test"?(s(),m(T,{key:0,runtime:"forms","log-service":e(v),onRestart:(_=u.value)==null?void 0:_.restart},null,8,["log-service","onRestart"])):f("",!0)]}),_:1}))}});export{Te as default};
//# sourceMappingURL=FormEditor.ca37b483.js.map
