import{d as b,eA as k,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.d6897520.js";import{_ as $,a as x}from"./FormTester.vue_vue_type_script_setup_true_lang.ef9090e3.js";import{S as I,L as P}from"./SmartConsole.5f1c5f28.js";import{a as R}from"./asyncComputed.2c363ccc.js";import{F as T}from"./forms.346cb6b2.js";import{W as S}from"./workspaces.fb65e732.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.bca29f12.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.51351099.js";import{B as F}from"./BaseLayout.a0b2c3e1.js";import{A as g,T as N}from"./TabPane.c8258ec5.js";import"./index.fd09b35e.js";import{c as L}from"./index.65fddafd.js";import"./Title.9e102f51.js";import"./Form.a2bccbf0.js";import"./broker.2631cbda.js";import"./index.3b692b6d.js";import"./pubsub.e0b33cd4.js";import"./executeJs.8211d702.js";import"./icons.20b5fc8a.js";import"./CircularLoading.74c5b113.js";import"./PlayerNavbar.582e448c.js";import"./index.40bea6c2.js";import"./Steps.1d151ab5.js";import"./Modal.1a4e3f2f.js";import"./WidgetsFrame.b500b4a0.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.f720947f.js";import"./dashes.dff0708d.js";import"./activeRecord.e97440b4.js";import"./hooks.00c0c0b3.js";import"./jobs.341e30c2.js";import"./index.a2784b6b.js";import"./uuid.4307559f.js";import"./ant-design.25ee6641.js";import"./index.dcf9fd0a.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]="0d33f834-0234-4bee-9815-8d6d80605701",r._sentryDebugIdIdentifier="sentry-dbid-0d33f834-0234-4bee-9815-8d6d80605701")}catch{}})();const V=b({__name:"PreviewButton",props:{model:{}},setup(r){const s=r,p=k(),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=b({__name:"FormEditor",setup(r){const s=w(),p=k(),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.d05e9bb3.js.map
