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 c,eD as B}from"./registerWidgets.4340e287.js";import{_ as C,a as $}from"./FormTester.vue_vue_type_script_setup_true_lang.f94aa34a.js";import{S as I,L as P}from"./SmartConsole.a2b6bdb5.js";import{a as R}from"./asyncComputed.a4cc4ebe.js";import{F as T}from"./forms.35e1ba4a.js";import{W as D}from"./workspaces.ff4ec9b2.js";import{_ as S}from"./SaveButton.vue_vue_type_script_setup_true_lang.a60de054.js";import{_ as N}from"./DocsButton.vue_vue_type_script_setup_true_lang.82d53ed3.js";import{B as A}from"./BaseLayout.6b4d6782.js";import{A as b,T as F}from"./TabPane.629b28d9.js";import"./index.4e740cc4.js";import{c as L}from"./index.87d21376.js";import"./Title.4165770a.js";import"./Form.7b78c348.js";import"./broker.439256b4.js";import"./passwordlessManager.8c70219b.js";import"./pubsub.3290d859.js";import"./storage.dfe55847.js";import"./Passwordless.81090626.js";import"./CircularLoading.1cc5445b.js";import"./icons.da02f7f7.js";import"./executeJs.cdd93f83.js";import"./PlayerNavbar.c59d454a.js";import"./index.bdeb3c9e.js";import"./Steps.36594e67.js";import"./Modal.51841735.js";import"./WidgetsFrame.0a348048.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.9db638e5.js";import"./dashes.8416a46d.js";import"./activeRecord.c40ac301.js";import"./hooks.d572fc44.js";import"./jobs.33e9ced7.js";import"./index.d24f6130.js";import"./uuid.3f26f6c2.js";import"./ant-design.56df7a71.js";import"./index.c13b703c.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]="ce356e3c-8b10-437b-80d3-00cfe5bf29dd",r._sentryDebugIdIdentifier="sentry-dbid-ce356e3c-8b10-437b-80d3-00cfe5bf29dd")}catch{}})();const V=g({__name:"PreviewButton",props:{model:{}},setup(r){const s=r,p=k(),u=w(),o=()=>{const l=p.query;u.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(),p=k(),u=y(null),o=y("test");function l(){s.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)=>(a(),m(A,{"full-canvas":o.value==="test"},{navbar:n(()=>[e(t)?(a(),m(e(L),{key:0,title:e(t).form.title,onBack:l},{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"])):c("",!0)]),_:1},8,["title"])):c("",!0)]),content:n(()=>[e(t)&&o.value==="test"?(a(),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"?(a(),m($,{key:1,form:e(t).form},null,8,["form"])):c("",!0)]),footer:n(()=>{var d;return[e(t)&&o.value==="test"?(a(),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.66628441.js.map
