import{d as g,eA as k,ez as w,b as a,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.d94fff8c.js";import{_ as B,a as C}from"./FormTester.vue_vue_type_script_setup_true_lang.c1ecd882.js";import{S as I,L as P}from"./SmartConsole.4ccb77f1.js";import{a as R}from"./asyncComputed.6da48dd7.js";import{F as T}from"./forms.6cfc05eb.js";import{W as S}from"./workspaces.c4438eba.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.00be30ea.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.21d0d4fe.js";import{_ as F}from"./LaunchButton.vue_vue_type_script_setup_true_lang.48d53a64.js";import{B as N}from"./BaseLayout.f1c5ada3.js";import{A as b,T as L}from"./TabPane.71415757.js";import"./index.e638f190.js";import{c as V}from"./index.c81cf59e.js";import"./Title.c70c7e79.js";import"./Form.57801503.js";import"./broker.44d4092d.js";import"./index.7a77fb2c.js";import"./pubsub.39314a92.js";import"./executeJs.99ff6d52.js";import"./icons.fec42461.js";import"./CircularLoading.8c280b78.js";import"./PlayerNavbar.7583d5f4.js";import"./index.3dad0da1.js";import"./Steps.0a5e4246.js";import"./WidgetsFrame.2f3ca3a1.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.4e98488d.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.9631319b.js";import"./index.1978a0ba.js";import"./CollapsePanel.1d546a09.js";import"./index.0e652438.js";import"./index.0f14f01f.js";import"./index.209f6c1c.js";import"./dashes.8c8e25c6.js";import"./activeRecord.4bb9e983.js";import"./hooks.0a2d0d18.js";import"./jobs.314c73b6.js";import"./index.3709b59d.js";import"./uuid.fd17a681.js";import"./url.596d80c9.js";import"./ant-design.b0e50c8b.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[s]="0860d0cb-75ce-419b-804c-73cfb54338eb",r._sentryDebugIdIdentifier="sentry-dbid-0860d0cb-75ce-419b-804c-73cfb54338eb")}catch{}})();const q=g({__name:"PreviewButton",props:{model:{}},setup(r){const s=r,c=k(),u=w(),o=()=>{const l=c.query;u.push({path:`/_editor/${s.model.routeName}/${encodeURIComponent(s.model.path)}/preview`,query:l})};return(l,t)=>(a(),m(e(x),{class:"preview-button",onClick:o},{default:i(()=>[h(" Preview ")]),_:1}))}}),Be=g({__name:"FormEditor",setup(r){const s=w(),c=k(),u=y(null),o=y("test");function l(){s.push({name:"forms"})}const{result:t}=R(()=>Promise.all([S.get(),T.get(c.params.formPath)]).then(([v,f])=>$({workspace:v,form:f}))),_=P.create();return(v,f)=>(a(),m(N,null,{navbar:i(()=>[e(t)?(a(),m(e(V),{key:0,title:e(t).form.title,style:{padding:"5px 10px"},onBack:l},{footer:i(()=>[n(e(L),{"active-key":o.value,"onUpdate:activeKey":f[0]||(f[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(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"?(a(),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"?(a(),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"?(a(),m(C,{key:1,form:e(t).form},null,8,["form"])):p("",!0)]),footer:i(()=>{var d;return[e(t)&&o.value==="test"?(a(),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.9dadab30.js.map
