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 y,f as i,eu as p,eD as B}from"./registerWidgets.ca9618c6.js";import{_ as C,a as $}from"./FormTester.vue_vue_type_script_setup_true_lang.3b744181.js";import{S as I,L as P}from"./SmartConsole.445faa75.js";import{a as R}from"./asyncComputed.f26ab310.js";import{F as T}from"./forms.29c990b7.js";import{W as D}from"./workspaces.6d55a87a.js";import{_ as S}from"./SaveButton.vue_vue_type_script_setup_true_lang.a9541ad1.js";import{_ as N}from"./DocsButton.vue_vue_type_script_setup_true_lang.4a4a53ac.js";import{B as A}from"./BaseLayout.f93a7179.js";import{A as b,T as F}from"./TabPane.db1a28e3.js";import"./index.03d68eaf.js";import{c as L}from"./index.980eab3b.js";import"./Title.f740cc19.js";import"./Form.fac64e0c.js";import"./broker.0e82283f.js";import"./passwordlessManager.91e53713.js";import"./pubsub.197ceb4e.js";import"./storage.a502fdce.js";import"./Passwordless.b41a0b67.js";import"./CircularLoading.bb6bfe76.js";import"./icons.71da0300.js";import"./executeJs.c150f8a8.js";import"./PlayerNavbar.3587b21e.js";import"./index.0504862b.js";import"./Steps.b096a868.js";import"./Modal.7e951251.js";import"./WidgetsFrame.d97ae681.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.4f889fc5.js";import"./dashes.cb835544.js";import"./activeRecord.fa727ba5.js";import"./hooks.9e493a50.js";import"./jobs.915e461d.js";import"./index.c0bd1022.js";import"./uuid.77949d68.js";import"./ant-design.c8da8814.js";import"./index.6a4df70c.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]="03055811-3852-4253-b271-7a5beed221b1",r._sentryDebugIdIdentifier="sentry-dbid-03055811-3852-4253-b271-7a5beed221b1")}catch{}})();const V=g({__name:"PreviewButton",props:{model:{}},setup(r){const s=r,u=k(),l=w(),o=()=>{const c=u.query;l.push({path:`/_editor/${s.model.routeName}/${encodeURIComponent(s.model.path)}/preview`,query:c})};return(c,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(),l=y(null),o=y("test");function c(){s.push({name:"forms"})}const{result:t}=R(()=>Promise.all([D.get(),T.get(u.params.formPath)]).then(([v,f])=>B({workspace:v,form:f}))),_=P.create();return(v,f)=>(a(),m(A,{"full-canvas":o.value==="test"},{navbar:n(()=>[e(t)?(a(),m(e(L),{key:0,title:e(t).form.title,onBack:c},{footer:n(()=>[i(e(F),{"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(V,{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:l,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=l.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):p("",!0)]}),_:1},8,["full-canvas"]))}});export{ke as default};
//# sourceMappingURL=FormEditor.47b40eb8.js.map
