import{d as k,eA as b,ez as w,b as a,c as m,w as n,b2 as h,u as e,cd as B,r as y,f as i,ew as u,eF as C}from"./outputWidgets.eddbac36.js";import{_ as $,a as x}from"./FormTester.vue_vue_type_script_setup_true_lang.d433ae25.js";import{S as I,L as P}from"./SmartConsole.41c65287.js";import{a as R}from"./asyncComputed.fbd351ba.js";import{F as T}from"./forms.4b8bb1c1.js";import{W as S}from"./workspaces.54224ba5.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.f7559256.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.24b9d7bf.js";import{B as F}from"./BaseLayout.bab34813.js";import{A as g,T as N}from"./TabPane.05333dfb.js";import"./index.8b693270.js";import{c as L}from"./index.1a0ec4ff.js";import"./Title.7ca27be1.js";import"./Form.f5163eed.js";import"./broker.b662ddf3.js";import"./index.9830a393.js";import"./pubsub.9aea5614.js";import"./executeJs.b990b619.js";import"./icons.08aaa24c.js";import"./CircularLoading.bbd62e42.js";import"./PlayerNavbar.ef058b0b.js";import"./index.cc18f239.js";import"./Steps.894c5f7d.js";import"./Modal.761ee3d8.js";import"./WidgetsFrame.c6eb9ff3.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.b7eba10e.js";import"./dashes.f8c3da60.js";import"./activeRecord.64b754df.js";import"./hooks.7f3d2eee.js";import"./jobs.ee7e6eb2.js";import"./index.3475d619.js";import"./uuid.a7963699.js";import"./ant-design.109b29f5.js";import"./index.31447910.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]="78559d66-230c-41ee-a622-1f7ed28d7d8e",r._sentryDebugIdIdentifier="sentry-dbid-78559d66-230c-41ee-a622-1f7ed28d7d8e")}catch{}})();const V=k({__name:"PreviewButton",props:{model:{}},setup(r){const s=r,p=b(),l=w(),o=()=>{const c=p.query;l.push({path:`/_editor/${s.model.routeName}/${encodeURIComponent(s.model.path)}/preview`,query:c})};return(c,t)=>(a(),m(e(B),{class:"preview-button",onClick:o},{default:n(()=>[h(" Preview ")]),_:1}))}}),ge=k({__name:"FormEditor",setup(r){const s=w(),p=b(),l=y(null),o=y("test");function c(){s.push({name:"forms"})}const{result:t}=R(()=>Promise.all([S.get(),T.get(p.params.formPath)]).then(([v,f])=>C({workspace:v,form:f}))),_=P.create();return(v,f)=>(a(),m(F,{"full-canvas":o.value==="test"},{navbar:n(()=>[e(t)?(a(),m(e(L),{key:0,title:e(t).form.title,onBack:c},{footer:n(()=>[i(e(N),{"active-key":o.value,"onUpdate:activeKey":f[0]||(f[0]=d=>o.value=d)},{default:n(()=>[i(e(g),{key:"test",tab:"Test"}),i(e(g),{key:"settings",tab:"Settings"})]),_:1},8,["active-key"])]),extra:n(()=>[i(D,{path:"forms/overview"}),i(V,{model:e(t).form},null,8,["model"]),o.value==="settings"?(a(),m(A,{key:0,model:e(t).form},null,8,["model"])):u("",!0)]),_:1},8,["title"])):u("",!0)]),content:n(()=>[e(t)&&o.value==="test"?(a(),m($,{key:0,ref_key:"tester",ref:l,form:e(t).form,"log-service":e(_)},null,8,["form","log-service"])):u("",!0),e(t)&&o.value==="settings"?(a(),m(x,{key:1,form:e(t).form},null,8,["form"])):u("",!0)]),footer:n(()=>{var d;return[e(t)&&o.value==="test"?(a(),m(I,{key:0,runtime:"forms","log-service":e(_),onRestart:(d=l.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):u("",!0)]}),_:1},8,["full-canvas"]))}});export{ge as default};
//# sourceMappingURL=FormEditor.d85262b6.js.map
