import{d as g,ey as k,ex as w,b as s,c as m,w as n,b0 as h,u as e,cb as x,r as b,f as i,eu as u,eD as B}from"./registerWidgets.7c26f935.js";import{_ as C,a as $}from"./FormTester.vue_vue_type_script_setup_true_lang.48c4af86.js";import{S as I,L as P}from"./SmartConsole.299d0349.js";import{a as R}from"./asyncComputed.cfc29dee.js";import{F as T}from"./forms.4f444334.js";import{W as D}from"./workspaces.2b9ec268.js";import{_ as S}from"./SaveButton.vue_vue_type_script_setup_true_lang.72254330.js";import{_ as N}from"./DocsButton.vue_vue_type_script_setup_true_lang.d8e65587.js";import{B as F}from"./BaseLayout.772b473a.js";import{a as y,T as L}from"./index.dee97b44.js";import"./index.a5f338b1.js";import{c as V}from"./index.4f17481f.js";import"./Title.9a021125.js";import"./Form.ac091445.js";import"./broker.b920ac3d.js";import"./passwordlessManager.5d139655.js";import"./pubsub.c3a63076.js";import"./storage.53222b6f.js";import"./Passwordless.645f1350.js";import"./CircularLoading.8fe9fc02.js";import"./icons.d315d375.js";import"./executeJs.cc17e4d8.js";import"./PlayerNavbar.85a5836e.js";import"./index.1d4b40b5.js";import"./Steps.0a01d796.js";import"./Modal.34b47b9a.js";import"./WidgetsFrame.fefe127b.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.a1589799.js";import"./dashes.0c09108e.js";import"./activeRecord.d07557d8.js";import"./hooks.3d13470e.js";import"./jobs.dad8f341.js";import"./uuid.18e8e762.js";import"./index.9a7a96c9.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]="d3c08ac2-d711-46bb-a24b-8b95e65421d9",r._sentryDebugIdIdentifier="sentry-dbid-d3c08ac2-d711-46bb-a24b-8b95e65421d9")}catch{}})();const q=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(x),{class:"preview-button",onClick:o},{default:n(()=>[h(" Preview ")]),_:1}))}}),ye=g({__name:"FormEditor",setup(r){const a=w(),c=k(),p=b(null),o=b("test");function l(){a.push({name:"forms"})}const{result:t}=R(()=>Promise.all([D.get(),T.get(c.params.formPath)]).then(([v,f])=>B({workspace:v,form:f}))),_=P.create();return(v,f)=>(s(),m(F,{"full-canvas":o.value==="test"},{navbar:n(()=>[e(t)?(s(),m(e(V),{key:0,title:e(t).form.title,onBack:l},{footer:n(()=>[i(e(L),{"active-key":o.value,"onUpdate:activeKey":f[0]||(f[0]=d=>o.value=d)},{default:n(()=>[i(e(y),{key:"test",tab:"Test"}),i(e(y),{key:"settings",tab:"Settings"})]),_:1},8,["active-key"])]),extra:n(()=>[i(N,{path:"forms/overview"}),i(q,{model:e(t).form},null,8,["model"]),o.value==="settings"?(s(),m(S,{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(C,{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($,{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{ye as default};
//# sourceMappingURL=FormEditor.ccff7d64.js.map
