import{d as b,eA as k,ez as w,b as a,c as m,w as i,aJ as h,u as e,c4 as B,r as y,f as n,ew as p,eF as C}from"./outputWidgets.b43a489b.js";import{_ as $,a as x}from"./FormTester.vue_vue_type_script_setup_true_lang.fa23328d.js";import{S as I,L as P}from"./SmartConsole.5df8d8f1.js";import{a as R}from"./asyncComputed.a42e75bb.js";import{F as T}from"./forms.83be8c86.js";import{W as S}from"./workspaces.eecbf708.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.3c7b2774.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.e267e7a4.js";import{B as F}from"./BaseLayout.87d1e05b.js";import{A as g,T as N}from"./TabPane.b49c19a0.js";import"./index.956893d2.js";import{c as L}from"./index.523f4a12.js";import"./Title.47040052.js";import"./Form.1797df89.js";import"./broker.f7aea10a.js";import"./index.4994c8b7.js";import"./pubsub.6fd47a9d.js";import"./executeJs.3803a920.js";import"./icons.de9af46a.js";import"./CircularLoading.251f1c45.js";import"./PlayerNavbar.368249cf.js";import"./index.42b92ee8.js";import"./Steps.6f5751ad.js";import"./Modal.ec042a35.js";import"./WidgetsFrame.4933b50d.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.cbb6820e.js";import"./StageRunSelector.vue_vue_type_script_setup_true_lang.2d955392.js";import"./index.0887e3a5.js";import"./CollapsePanel.3e5384f9.js";import"./index.9367a16c.js";import"./index.65dea612.js";import"./dashes.952e2e3f.js";import"./activeRecord.2bc5cc59.js";import"./hooks.18db1931.js";import"./jobs.a52f7106.js";import"./index.8a60ee51.js";import"./uuid.3c022812.js";import"./ant-design.dc7acb1e.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]="6ff53971-edbc-452f-8c18-807e25ac7891",r._sentryDebugIdIdentifier="sentry-dbid-6ff53971-edbc-452f-8c18-807e25ac7891")}catch{}})();const V=b({__name:"PreviewButton",props:{model:{}},setup(r){const s=r,c=k(),u=w(),o=()=>{const f=c.query;u.push({path:`/_editor/${s.model.routeName}/${encodeURIComponent(s.model.path)}/preview`,query:f})};return(f,t)=>(a(),m(e(B),{class:"preview-button",onClick:o},{default:i(()=>[h(" Preview ")]),_:1}))}}),he=b({__name:"FormEditor",setup(r){const s=w(),c=k(),u=y(null),o=y("test");function f(){s.push({name:"forms"})}const{result:t}=R(()=>Promise.all([S.get(),T.get(c.params.formPath)]).then(([v,l])=>C({workspace:v,form:l}))),_=P.create();return(v,l)=>(a(),m(F,null,{navbar:i(()=>[e(t)?(a(),m(e(L),{key:0,title:e(t).form.title,onBack:f},{footer:i(()=>[n(e(N),{"active-key":o.value,"onUpdate:activeKey":l[0]||(l[0]=d=>o.value=d)},{default:i(()=>[n(e(g),{key:"test",tab:"Test"}),n(e(g),{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"?(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($,{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(x,{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{he as default};
//# sourceMappingURL=FormEditor.efd44891.js.map
