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 u,eD as B}from"./registerWidgets.5ceb46ef.js";import{_ as C,a as $}from"./FormTester.vue_vue_type_script_setup_true_lang.4ea70657.js";import{S as I,L as P}from"./SmartConsole.743d8379.js";import{a as R}from"./asyncComputed.fd157db2.js";import{F as T}from"./forms.c52b0963.js";import{W as D}from"./workspaces.5f9f54a4.js";import{_ as S}from"./SaveButton.vue_vue_type_script_setup_true_lang.939451c7.js";import{_ as N}from"./DocsButton.vue_vue_type_script_setup_true_lang.219ee567.js";import{B as F}from"./BaseLayout.4bdff06f.js";import{a as b,T as L}from"./index.124d01ae.js";import"./index.fac4722d.js";import{c as V}from"./index.577eba83.js";import"./Title.d4cb8bc4.js";import"./FormItem.0abaafb1.js";import"./Form.9c114a17.js";import"./broker.70fbe32d.js";import"./passwordlessManager.db35a950.js";import"./pubsub.451b7de0.js";import"./storage.4e9cf889.js";import"./Passwordless.c8348dad.js";import"./CircularLoading.55a15bfc.js";import"./icons.b59fe784.js";import"./executeJs.855ab96d.js";import"./PlayerNavbar.a33eb7aa.js";import"./index.dd15e290.js";import"./Steps.82addfc6.js";import"./Modal.4e47c5c5.js";import"./WidgetsFrame.ce46d016.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.ad360533.js";import"./dashes.f46a0837.js";import"./activeRecord.693e9703.js";import"./hooks.79d0b235.js";import"./jobs.d7e56706.js";import"./uuid.764aefa4.js";import"./index.4fdcdf65.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]="874d65d3-0b35-4e5e-8460-dd73b9a0269f",r._sentryDebugIdIdentifier="sentry-dbid-874d65d3-0b35-4e5e-8460-dd73b9a0269f")}catch{}})();const q=g({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,p=k(),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(x),{class:"preview-button",onClick:o},{default:n(()=>[h(" Preview ")]),_:1}))}}),ge=g({__name:"FormEditor",setup(r){const a=w(),p=k(),l=y(null),o=y("test");function c(){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:c},{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"])):u("",!0)]),_:1},8,["title"])):u("",!0)]),content:n(()=>[e(t)&&o.value==="test"?(s(),m(C,{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($,{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.ee2ec713.js.map
