import{d as k,ez as b,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,eE as I,f as p,ev as c}from"./outputWidgets.9a4dffd5.js";import{_ as P,a as R}from"./FormTester.vue_vue_type_script_setup_true_lang.45105988.js";import{S as T,L as S}from"./SmartConsole.2f597edf.js";import{a as D}from"./asyncComputed.947a021a.js";import{F as N}from"./forms.ee974765.js";import{W as A}from"./workspaces.9b724498.js";import{_ as E}from"./SaveButton.vue_vue_type_script_setup_true_lang.9f93be5c.js";import{_ as F}from"./DocsButton.vue_vue_type_script_setup_true_lang.b0c540d5.js";import{_ as L}from"./LaunchButton.vue_vue_type_script_setup_true_lang.543f087f.js";import{B as V}from"./BaseLayout.a71d4fa9.js";import"./index.a351ac5c.js";import{r as q}from"./executeJs.002cd519.js";import{A as g,T as M}from"./TabPane.aa41b762.js";import"./index.6b397fb0.js";import{c as U}from"./index.c2be78ce.js";import"./Title.72e90637.js";import"./Form.0ea0ca53.js";import"./FormRunner.aa8ba382.js";import"./index.7e030f20.js";import"./pubsub.25596209.js";import"./CircularLoading.e0f97658.js";import"./WidgetsFrame.6bff1f4e.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.fa882ec7.js";import"./icons.d935dec9.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.08b0df03.js";import"./index.9be836f3.js";import"./CollapsePanel.a49bdae4.js";import"./index.3ecad98a.js";import"./index.0e22fd42.js";import"./index.c64df437.js";import"./dashes.8f97fb72.js";import"./activeRecord.6b2e89dc.js";import"./runnerData.8cacc2f4.js";import"./hooks.350ac392.js";import"./jobs.9fc486b1.js";import"./index.d0b58c73.js";import"./uuid.649f8e0e.js";import"./url.152c5826.js";import"./ant-design.edc4db28.js";import"./PlayerNavbar.ff252022.js";import"./Steps.a733e7f2.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]="1035ae1f-f072-491a-a809-af8cc99876ed",a._sentryDebugIdIdentifier="sentry-dbid-1035ae1f-f072-491a-a809-af8cc99876ed")}catch{}})();const W=k({__name:"PreviewButton",props:{model:{}},setup(a){const o=a,f=b(),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=k({__name:"FormEditor",setup(a){const o=h(),f=b(),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.f8bc0fe4.js.map
