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 y,f as i,eu as c,eD as B}from"./registerWidgets.faec4901.js";import{_ as C,a as $}from"./FormTester.vue_vue_type_script_setup_true_lang.ed965f1c.js";import{S as I,L as P}from"./SmartConsole.26699989.js";import{a as R}from"./asyncComputed.04758d6d.js";import{F as T}from"./forms.c3e90e83.js";import{W as D}from"./workspaces.6b009dc4.js";import{_ as S}from"./SaveButton.vue_vue_type_script_setup_true_lang.e5932fa0.js";import{_ as N}from"./DocsButton.vue_vue_type_script_setup_true_lang.24289042.js";import{B as F}from"./BaseLayout.1ce77a8d.js";import{a as b,T as L}from"./index.b821dc3a.js";import"./index.3344c224.js";import{c as V}from"./index.44ac919e.js";import"./Title.38629c7e.js";import"./transButton.389d0ba4.js";import"./FormItem.35215fb3.js";import"./Form.f98578c4.js";import"./broker.67a502ef.js";import"./passwordlessManager.90d3a316.js";import"./pubsub.c32c984e.js";import"./storage.02df2e1a.js";import"./Passwordless.961add2f.js";import"./CircularLoading.ca58d6f5.js";import"./icons.4b27c20b.js";import"./executeJs.b1249f30.js";import"./PlayerNavbar.49b00875.js";import"./index.dabe2e32.js";import"./Steps.77469d63.js";import"./Modal.c4a3eb37.js";import"./WidgetsFrame.6243aeb3.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.5737790c.js";import"./dashes.ee327d44.js";import"./activeRecord.64153c3d.js";import"./hooks.3f6f18d7.js";import"./jobs.b140b1fc.js";import"./uuid.ac88a235.js";import"./index.da74220a.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]="e91c7aab-3428-46c3-adb3-04fa9c1ce7ef",r._sentryDebugIdIdentifier="sentry-dbid-e91c7aab-3428-46c3-adb3-04fa9c1ce7ef")}catch{}})();const q=g({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,p=k(),u=w(),o=()=>{const l=p.query;u.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}))}}),ke=g({__name:"FormEditor",setup(r){const a=w(),p=k(),u=y(null),o=y("test");function l(){a.push({name:"forms"})}const{result:t}=R(()=>Promise.all([D.get(),T.get(p.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(b),{key:"test",tab:"Test"}),i(e(b),{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"])):c("",!0)]),_:1},8,["title"])):c("",!0)]),content:n(()=>[e(t)&&o.value==="test"?(s(),m(C,{key:0,ref_key:"tester",ref:u,form:e(t).form,"log-service":e(_)},null,8,["form","log-service"])):c("",!0),e(t)&&o.value==="settings"?(s(),m($,{key:1,form:e(t).form},null,8,["form"])):c("",!0)]),footer:n(()=>{var d;return[e(t)&&o.value==="test"?(s(),m(I,{key:0,runtime:"forms","log-service":e(_),onRestart:(d=u.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):c("",!0)]}),_:1},8,["full-canvas"]))}});export{ke as default};
//# sourceMappingURL=FormEditor.0efca050.js.map
