import{d as g,ey as k,ex as w,b as a,c as m,w as n,b0 as h,u as e,cb as x,r as b,f as i,eu as p,eD as B}from"./registerWidgets.2031932d.js";import{_ as C,a as $}from"./FormTester.vue_vue_type_script_setup_true_lang.d597c417.js";import{S as I,L as P}from"./SmartConsole.d0c13dae.js";import{a as R}from"./asyncComputed.57cbb10a.js";import{F as T}from"./forms.12f7b751.js";import{W as D}from"./workspaces.1906fd86.js";import{_ as S}from"./SaveButton.vue_vue_type_script_setup_true_lang.c0e86fd4.js";import{_ as N}from"./DocsButton.vue_vue_type_script_setup_true_lang.bf51a812.js";import{B as F}from"./BaseLayout.c048975a.js";import{a as y,T as L}from"./index.b16d118e.js";import"./index.05b91721.js";import{c as V}from"./index.5a7b7c6a.js";import"./Title.6d39f4ca.js";import"./transButton.d9059bcf.js";import"./FormItem.b791fd49.js";import"./Form.422a7411.js";import"./broker.6f7880d2.js";import"./passwordlessManager.50ecc1b4.js";import"./pubsub.9625b443.js";import"./storage.8b8c0b1c.js";import"./Passwordless.faf16595.js";import"./CircularLoading.05559def.js";import"./icons.3cd62928.js";import"./executeJs.c48dc3cc.js";import"./PlayerNavbar.4f4e0935.js";import"./index.92e22978.js";import"./Steps.11cb2a99.js";import"./Modal.380d5af9.js";import"./WidgetsFrame.090dad8f.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.835eff0a.js";import"./dashes.1acea272.js";import"./activeRecord.7b173443.js";import"./hooks.c1ec5474.js";import"./jobs.a906ca62.js";import"./uuid.f2026848.js";import"./index.b4b072a9.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[s]="9f614ed6-43c5-459b-b82f-bd0424efb283",r._sentryDebugIdIdentifier="sentry-dbid-9f614ed6-43c5-459b-b82f-bd0424efb283")}catch{}})();const q=g({__name:"PreviewButton",props:{model:{}},setup(r){const s=r,u=k(),f=w(),o=()=>{const l=u.query;f.push({path:`/_editor/${s.model.routeName}/${encodeURIComponent(s.model.path)}/preview`,query:l})};return(l,t)=>(a(),m(e(x),{class:"preview-button",onClick:o},{default:n(()=>[h(" Preview ")]),_:1}))}}),ke=g({__name:"FormEditor",setup(r){const s=w(),u=k(),f=b(null),o=b("test");function l(){s.push({name:"forms"})}const{result:t}=R(()=>Promise.all([D.get(),T.get(u.params.formPath)]).then(([v,c])=>B({workspace:v,form:c}))),_=P.create();return(v,c)=>(a(),m(F,{"full-canvas":o.value==="test"},{navbar:n(()=>[e(t)?(a(),m(e(V),{key:0,title:e(t).form.title,onBack:l},{footer:n(()=>[i(e(L),{"active-key":o.value,"onUpdate:activeKey":c[0]||(c[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"?(a(),m(S,{key:0,model:e(t).form},null,8,["model"])):p("",!0)]),_:1},8,["title"])):p("",!0)]),content:n(()=>[e(t)&&o.value==="test"?(a(),m(C,{key:0,ref_key:"tester",ref:f,form:e(t).form,"log-service":e(_)},null,8,["form","log-service"])):p("",!0),e(t)&&o.value==="settings"?(a(),m($,{key:1,form:e(t).form},null,8,["form"])):p("",!0)]),footer:n(()=>{var d;return[e(t)&&o.value==="test"?(a(),m(I,{key:0,runtime:"forms","log-service":e(_),onRestart:(d=f.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):p("",!0)]}),_:1},8,["full-canvas"]))}});export{ke as default};
//# sourceMappingURL=FormEditor.b9b73191.js.map
