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 p,eD as B}from"./registerWidgets.9fce82a0.js";import{_ as C,a as $}from"./FormTester.vue_vue_type_script_setup_true_lang.d013df0d.js";import{S as I,L as P}from"./SmartConsole.6ed7ad1c.js";import{a as R}from"./asyncComputed.a4b709a3.js";import{F as T}from"./forms.f9e60a69.js";import{W as D}from"./workspaces.7ad2f8ea.js";import{_ as S}from"./SaveButton.vue_vue_type_script_setup_true_lang.5580f63b.js";import{_ as N}from"./DocsButton.vue_vue_type_script_setup_true_lang.41ad9626.js";import{B as A}from"./BaseLayout.ec0601c1.js";import{A as b,T as F}from"./TabPane.439993c1.js";import"./index.e3cd80f7.js";import{c as L}from"./index.b9dfa5e6.js";import"./Title.26974edb.js";import"./Form.413853c0.js";import"./broker.640b7bc7.js";import"./passwordlessManager.eda842b8.js";import"./pubsub.025cc397.js";import"./storage.ae287dfa.js";import"./Passwordless.0badc2f2.js";import"./CircularLoading.45bdfef7.js";import"./icons.1992e13b.js";import"./executeJs.0cb26839.js";import"./PlayerNavbar.80abf434.js";import"./index.9df32b45.js";import"./Steps.a44e7d48.js";import"./Modal.3e57b15b.js";import"./WidgetsFrame.28239fa9.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.f47e89b8.js";import"./dashes.ea544587.js";import"./activeRecord.872f4269.js";import"./hooks.31ddb50a.js";import"./jobs.ffce9a38.js";import"./index.c9f7f8f0.js";import"./uuid.f77225ce.js";import"./ant-design.cd2520f8.js";import"./index.e8158c16.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]="81cb97df-772e-4c50-a7ef-89a0ade8f022",r._sentryDebugIdIdentifier="sentry-dbid-81cb97df-772e-4c50-a7ef-89a0ade8f022")}catch{}})();const V=g({__name:"PreviewButton",props:{model:{}},setup(r){const a=r,u=k(),c=w(),o=()=>{const f=u.query;c.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}))}}),ke=g({__name:"FormEditor",setup(r){const a=w(),u=k(),c=y(null),o=y("test");function f(){a.push({name:"forms"})}const{result:t}=R(()=>Promise.all([D.get(),T.get(u.params.formPath)]).then(([v,l])=>B({workspace:v,form:l}))),_=P.create();return(v,l)=>(s(),m(A,{"full-canvas":o.value==="test"},{navbar:n(()=>[e(t)?(s(),m(e(L),{key:0,title:e(t).form.title,onBack:f},{footer:n(()=>[i(e(F),{"active-key":o.value,"onUpdate:activeKey":l[0]||(l[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"?(s(),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"?(s(),m(C,{key:0,ref_key:"tester",ref:c,form:e(t).form,"log-service":e(_)},null,8,["form","log-service"])):p("",!0),e(t)&&o.value==="settings"?(s(),m($,{key:1,form:e(t).form},null,8,["form"])):p("",!0)]),footer:n(()=>{var d;return[e(t)&&o.value==="test"?(s(),m(I,{key:0,runtime:"forms","log-service":e(_),onRestart:(d=c.value)==null?void 0:d.restart},null,8,["log-service","onRestart"])):p("",!0)]}),_:1},8,["full-canvas"]))}});export{ke as default};
//# sourceMappingURL=FormEditor.88d67f2b.js.map
