import{d as b,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 c,eE as I}from"./outputWidgets.942e04a7.js";import{_ as P,a as R}from"./FormTester.vue_vue_type_script_setup_true_lang.7be3dc66.js";import{S as T,L as S}from"./SmartConsole.e0f7c581.js";import{a as D}from"./asyncComputed.581a6d32.js";import{F as N}from"./forms.4f96615b.js";import{W as A}from"./workspaces.cf573e29.js";import{_ as E}from"./SaveButton.vue_vue_type_script_setup_true_lang.50260a39.js";import{_ as F}from"./DocsButton.vue_vue_type_script_setup_true_lang.01e0f656.js";import{_ as L}from"./LaunchButton.vue_vue_type_script_setup_true_lang.94c59f18.js";import{B as V}from"./BaseLayout.d874b5ce.js";import"./index.6d3b437a.js";import{r as q}from"./executeJs.3f9b10c6.js";import{A as g,T as M}from"./TabPane.7d8b12fe.js";import"./index.5fad78a5.js";import{c as U}from"./index.e7605f26.js";import"./Title.02f374d5.js";import"./Form.fa989528.js";import"./broker.01782ddd.js";import"./index.fcbddf23.js";import"./pubsub.c4874b0f.js";import"./CircularLoading.76539627.js";import"./WidgetsFrame.457bee85.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.210fd2fb.js";import"./icons.c37bd5be.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.4265f2b8.js";import"./index.ce693d29.js";import"./CollapsePanel.ca2159fa.js";import"./index.182b7916.js";import"./index.90e879e1.js";import"./index.afbbab9c.js";import"./dashes.6b0715ff.js";import"./activeRecord.c49c8827.js";import"./runnerData.e597f90f.js";import"./hooks.0db879f8.js";import"./jobs.a4c576d9.js";import"./index.f7b7cb5d.js";import"./uuid.40086d10.js";import"./url.c27b4b3f.js";import"./ant-design.683e844e.js";import"./PlayerNavbar.a355e205.js";import"./Steps.7aef7647.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]="a6a91c70-ee5f-445a-afb3-281b412154ff",a._sentryDebugIdIdentifier="sentry-dbid-a6a91c70-ee5f-445a-afb3-281b412154ff")}catch{}})();const W=b({__name:"PreviewButton",props:{model:{}},setup(a){const o=a,f=k(),u=h(),r=()=>{const l=f.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=b({__name:"FormEditor",setup(a){const o=h(),f=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(f.params.formPath)]).then(([d,n])=>I({workspace:d,form:n}))),v=S.create();function x(d,n){q("editor",o,d,n)}return C(()=>f.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(g),{key:"test",tab:"Test"}),p(e(g),{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"])):c("",!0)]),_:1},8,["title"])):c("",!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"])):c("",!0),e(t)&&r.value==="settings"?(s(),m(R,{key:1,form:e(t).form},null,8,["form"])):c("",!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"])):c("",!0)]}),_:1}))}});export{Te as default};
//# sourceMappingURL=FormEditor.47232960.js.map
