import{d as g,eA as k,ez as w,b as s,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.b9aa154a.js";import{_ as $,a as x}from"./FormTester.vue_vue_type_script_setup_true_lang.ae77b5f0.js";import{S as I,L as P}from"./SmartConsole.7bdfdf85.js";import{a as R}from"./asyncComputed.9bda3979.js";import{F as T}from"./forms.4a73365d.js";import{W as S}from"./workspaces.157f78cb.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.c5ad27ab.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.6e7114de.js";import{B as F}from"./BaseLayout.ddf81c1c.js";import{A as b,T as N}from"./TabPane.3d00468a.js";import"./index.bb85a084.js";import{c as L}from"./index.74d4e484.js";import"./Title.6cd833fd.js";import"./Form.55f226f4.js";import"./broker.4016214f.js";import"./index.a3419ef4.js";import"./pubsub.967f482a.js";import"./executeJs.99fc5689.js";import"./icons.4ed83c58.js";import"./CircularLoading.06bdbb4b.js";import"./PlayerNavbar.2c80c9e8.js";import"./index.ade1bec6.js";import"./Steps.b2e658b4.js";import"./Modal.e6afe637.js";import"./WidgetsFrame.8ed370e1.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.469e0f4c.js";import"./dashes.23df7fa5.js";import"./activeRecord.8939db5d.js";import"./hooks.d7d8bca7.js";import"./jobs.193d98cf.js";import"./index.23063916.js";import"./uuid.230991bb.js";import"./ant-design.a6411a07.js";import"./index.6b140cad.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]="5a3c8ae2-e448-4c02-940b-04b45bada081",r._sentryDebugIdIdentifier="sentry-dbid-5a3c8ae2-e448-4c02-940b-04b45bada081")}catch{}})();const V=g({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,c=k(),p=w(),o=()=>{const l=c.query;p.push({path:`/_editor/${a.model.routeName}/${encodeURIComponent(a.model.path)}/preview`,query:l})};return(l,t)=>(s(),m(e(B),{class:"preview-button",onClick:o},{default:n(()=>[h(" Preview ")]),_:1}))}}),be=g({__name:"FormEditor",setup(r){const a=w(),c=k(),p=y(null),o=y("test");function l(){a.push({name:"forms"})}const{result:t}=R(()=>Promise.all([S.get(),T.get(c.params.formPath)]).then(([v,f])=>C({workspace:v,form:f}))),_=P.create();return(v,f)=>(s(),m(F,{"full-canvas":o.value==="test"},{navbar:n(()=>[e(t)?(s(),m(e(L),{key:0,title:e(t).form.title,onBack:l},{footer:n(()=>[i(e(N),{"active-key":o.value,"onUpdate:activeKey":f[0]||(f[0]=d=>o.value=d)},{default:n(()=>[i(e(b),{key:"test",tab:"Test"}),i(e(b),{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"?(s(),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"?(s(),m($,{key:0,ref_key:"tester",ref:p,form:e(t).form,"log-service":e(_)},null,8,["form","log-service"])):u("",!0),e(t)&&o.value==="settings"?(s(),m(x,{key:1,form:e(t).form},null,8,["form"])):u("",!0)]),footer:n(()=>{var d;return[e(t)&&o.value==="test"?(s(),m(I,{key:0,runtime:"forms","log-service":e(_),onRestart:(d=p.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):u("",!0)]}),_:1},8,["full-canvas"]))}});export{be as default};
//# sourceMappingURL=FormEditor.847687b6.js.map
