import{d as g,eA as k,ez as w,b as s,c as m,w as i,aT as h,u as e,c9 as B,r as y,f as n,ew as p,eF as C}from"./outputWidgets.52de64cd.js";import{_ as T,a as $}from"./FormTester.vue_vue_type_script_setup_true_lang.0f221e51.js";import{S as x,L as I}from"./SmartConsole.9babf82e.js";import{a as P}from"./asyncComputed.00e76dd1.js";import{F as R}from"./forms.a88741b7.js";import{W as S}from"./workspaces.bfe7b570.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.50c1fabc.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.5f9b00a2.js";import{B as F}from"./BaseLayout.c2f90625.js";import{A as b,T as N}from"./TabPane.c3c2f5a1.js";import"./index.3ed5d65c.js";import{c as L}from"./index.7800af0b.js";import"./Title.baba2b21.js";import"./Form.09072055.js";import"./broker.96aadc7e.js";import"./index.ef1b6dd8.js";import"./pubsub.6e9aa6f2.js";import"./executeJs.f8066818.js";import"./icons.bf6505eb.js";import"./CircularLoading.b5138fc9.js";import"./PlayerNavbar.ff23d2a5.js";import"./index.a07ffcc5.js";import"./Steps.8311861f.js";import"./Modal.85617d2e.js";import"./WidgetsFrame.2ce167ed.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.35c64b7c.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.6f54e569.js";import"./index.396ff1b5.js";import"./CollapsePanel.d756b861.js";import"./index.1ebdd57a.js";import"./index.c0e74c90.js";import"./dashes.9265143d.js";import"./activeRecord.ebcbfc07.js";import"./hooks.50fa5e89.js";import"./jobs.4df37514.js";import"./index.5a37ef67.js";import"./uuid.0840f7c5.js";import"./ant-design.20ade584.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]="8631f8b8-5368-4734-baf8-f6aa396ecc0f",r._sentryDebugIdIdentifier="sentry-dbid-8631f8b8-5368-4734-baf8-f6aa396ecc0f")}catch{}})();const V=g({__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(B),{class:"preview-button",onClick:o},{default:i(()=>[h(" Preview ")]),_:1}))}}),he=g({__name:"FormEditor",setup(r){const a=w(),f=k(),u=y(null),o=y("test");function c(){a.push({name:"forms"})}const{result:t}=P(()=>Promise.all([S.get(),R.get(f.params.formPath)]).then(([v,l])=>C({workspace:v,form:l}))),_=I.create();return(v,l)=>(s(),m(F,null,{navbar:i(()=>[e(t)?(s(),m(e(L),{key:0,title:e(t).form.title,onBack:c},{footer:i(()=>[n(e(N),{"active-key":o.value,"onUpdate:activeKey":l[0]||(l[0]=d=>o.value=d)},{default:i(()=>[n(e(b),{key:"test",tab:"Test"}),n(e(b),{key:"settings",tab:"Settings"})]),_:1},8,["active-key"])]),extra:i(()=>[n(D,{path:"forms/overview"}),n(V,{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(T,{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($,{key:1,form:e(t).form},null,8,["form"])):p("",!0)]),footer:i(()=>{var d;return[e(t)&&o.value==="test"?(s(),m(x,{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{he as default};
//# sourceMappingURL=FormEditor.d3efb1b1.js.map
