import{d as k,eA as b,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.541a6a3f.js";import{_ as $,a as x}from"./FormTester.vue_vue_type_script_setup_true_lang.5ffd06da.js";import{S as I,L as P}from"./SmartConsole.e1c7bfc3.js";import{a as R}from"./asyncComputed.6496ca6b.js";import{F as T}from"./forms.4ff36d50.js";import{W as S}from"./workspaces.d27d9f39.js";import{_ as A}from"./SaveButton.vue_vue_type_script_setup_true_lang.af310abc.js";import{_ as D}from"./DocsButton.vue_vue_type_script_setup_true_lang.3e45b890.js";import{B as F}from"./BaseLayout.5761ab4f.js";import{A as g,T as N}from"./TabPane.40396dd5.js";import"./index.d89692b2.js";import{c as L}from"./index.7fb7f882.js";import"./Title.3011141f.js";import"./Form.2a9acb85.js";import"./broker.7dc50939.js";import"./index.669ed6e9.js";import"./pubsub.8482a29f.js";import"./executeJs.16417bf7.js";import"./icons.fbbc5318.js";import"./CircularLoading.46b3501d.js";import"./PlayerNavbar.f92ecc26.js";import"./index.1b1480b6.js";import"./Steps.554db205.js";import"./Modal.e29b464d.js";import"./WidgetsFrame.2d6f15b2.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.a70d3ffa.js";import"./dashes.438c0418.js";import"./activeRecord.867c40fa.js";import"./hooks.c3613214.js";import"./jobs.8963c228.js";import"./index.3cff0676.js";import"./uuid.25354c68.js";import"./ant-design.e75c36c7.js";import"./index.33fb7a48.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]="9a25f7d1-c199-4a07-845d-04f967ae57d8",r._sentryDebugIdIdentifier="sentry-dbid-9a25f7d1-c199-4a07-845d-04f967ae57d8")}catch{}})();const V=k({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,p=b(),l=w(),o=()=>{const c=p.query;l.push({path:`/_editor/${a.model.routeName}/${encodeURIComponent(a.model.path)}/preview`,query:c})};return(c,t)=>(s(),m(e(B),{class:"preview-button",onClick:o},{default:n(()=>[h(" Preview ")]),_:1}))}}),ge=k({__name:"FormEditor",setup(r){const a=w(),p=b(),l=y(null),o=y("test");function c(){a.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)=>(s(),m(F,{"full-canvas":o.value==="test"},{navbar:n(()=>[e(t)?(s(),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"?(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:l,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=l.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):u("",!0)]}),_:1},8,["full-canvas"]))}});export{ge as default};
//# sourceMappingURL=FormEditor.91268b07.js.map
