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.aa99a257.js";import{_ as C,a as $}from"./FormTester.vue_vue_type_script_setup_true_lang.154a2739.js";import{S as I,L as P}from"./SmartConsole.d70c8a2d.js";import{a as R}from"./asyncComputed.0fe9c7ca.js";import{F as T}from"./forms.ea000aa1.js";import{W as D}from"./workspaces.469ca98e.js";import{_ as S}from"./SaveButton.vue_vue_type_script_setup_true_lang.ed4c011d.js";import{_ as N}from"./DocsButton.vue_vue_type_script_setup_true_lang.0a7246b9.js";import{B as F}from"./BaseLayout.7727a5c7.js";import{a as b,T as L}from"./index.4c73616e.js";import"./index.39c01bd2.js";import{c as V}from"./index.3dca4144.js";import"./Title.6e572405.js";import"./Form.edded16b.js";import"./broker.5d716172.js";import"./passwordlessManager.16d17276.js";import"./pubsub.1c962ca1.js";import"./storage.140ce577.js";import"./Passwordless.6bf36385.js";import"./CircularLoading.2591f9bb.js";import"./icons.28b8a025.js";import"./executeJs.5dcfceae.js";import"./PlayerNavbar.16616d6b.js";import"./index.237f2f09.js";import"./Steps.4985fee3.js";import"./Modal.a3433d40.js";import"./WidgetsFrame.c0661437.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.ba9f8650.js";import"./dashes.fa9afad9.js";import"./activeRecord.a0fab812.js";import"./hooks.b7fde148.js";import"./jobs.093b9a31.js";import"./uuid.ef3a90b6.js";import"./index.782ff7c7.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]="d7fa1e2a-8271-43f3-8a7d-b53deae66eda",r._sentryDebugIdIdentifier="sentry-dbid-d7fa1e2a-8271-43f3-8a7d-b53deae66eda")}catch{}})();const q=g({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,p=k(),l=w(),o=()=>{const f=p.query;l.push({path:`/_editor/${a.model.routeName}/${encodeURIComponent(a.model.path)}/preview`,query:f})};return(f,t)=>(s(),m(e(x),{class:"preview-button",onClick:o},{default:n(()=>[h(" Preview ")]),_:1}))}}),be=g({__name:"FormEditor",setup(r){const a=w(),p=k(),l=y(null),o=y("test");function f(){a.push({name:"forms"})}const{result:t}=R(()=>Promise.all([D.get(),T.get(p.params.formPath)]).then(([v,c])=>B({workspace:v,form:c}))),_=P.create();return(v,c)=>(s(),m(F,{"full-canvas":o.value==="test"},{navbar:n(()=>[e(t)?(s(),m(e(V),{key:0,title:e(t).form.title,onBack:f},{footer:n(()=>[i(e(L),{"active-key":o.value,"onUpdate:activeKey":c[0]||(c[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{be as default};
//# sourceMappingURL=FormEditor.67094712.js.map
