import{i as w}from"./metadata--B3wAPVN.js";import{W as x}from"./Watermark-BBQ6W5Iz.js";import{P as C}from"./PageStageView-DgoYiUD6.js";import{F as D}from"./PhArrowSquareOut.vue-CaJ7Miqi.js";import{L as I}from"./CircularLoading-Dm1gD7nh.js";import{e as P,r as f,M as z,b as H,f as d,j as L,q as s,p as e,w as n,b5 as _,n as i,R as h,S as b,l as S,b6 as k,H as V,V as F,ae as B,g as a,E,Q as M,aM as N}from"./jwt-decode.esm-C7p7KYmD.js";import{u as T,f as W}from"./workspaceStore-C02eSYYX.js";import{C as j}from"./index-Bq1tJAxg.js";import{L as R}from"./LoadingOutlined-BqTEfowm.js";import"./PhCursorClick.vue-R7PVFNVB.js";import"./PhHouse.vue-CJ1VeqtB.js";import"./PhMagnifyingGlass.vue-DNEPEcIe.js";import"./PhWebhooksLogo.vue-g_Zstsmg.js";import"./constants-DMOJEfPk.js";import"./userStore-Cvp-HM2T.js";import"./consoleCapture-BZVsCKpd.js";import"./runnerData-tVXldQBM.js";import"./url-DckRtskK.js";import"./colorHelpers-Aow9wfUz.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},l=new Error().stack;l&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[l]="e2f2fcee-8bcb-4dbb-af26-7a078c3562fc",r._sentryDebugIdIdentifier="sentry-dbid-e2f2fcee-8bcb-4dbb-af26-7a078c3562fc")}catch{}})();const $={key:0,class:"home-container"},q={key:1,class:"page-wrapper"},A={key:2,class:"home-container"},O=P({__name:"Home",setup(r){const l=B(),c=T(),u=f(!0),m=f(null);z(async()=>{try{const t=await W();t?.type==="page"&&(m.value=t.data)}catch{}finally{u.value=!1}});const y=H(()=>c.state.workspace?.sidebar.filter(t=>t.id!=="home")||[]),p=f(null),v=async(t,g)=>{p.value=g,await l.push({path:`/${t}`}),p.value=null};return(t,g)=>u.value?(a(),d("div",$,[s(I)])):m.value?(a(),d("div",q,[s(C,{"ui-data":m.value},null,8,["ui-data"])])):e(c).state.workspace?(a(),d("div",A,[s(e(_),{vertical:"",gap:"large",class:"cards-container"},{default:n(()=>[y.value.length===0?(a(),i(e(k),{key:0,type:"secondary",style:{"font-size":"18px"}},{default:n(()=>[h(b(e(S).translate("i18n_home_no_forms_available")),1)]),_:1})):(a(!0),d(V,{key:1},F(y.value,o=>(a(),i(e(j),{key:o.id,class:E(["form-card",{loading:p.value===o.id}]),"body-style":{cursor:"pointer"},onClick:Q=>v(o.path,o.id)},{default:n(()=>[s(e(_),{gap:"large",align:"center",justify:"space-between"},{default:n(()=>[(a(),i(M(e(w)(o.type)),{style:{"flex-shrink":"0",width:"22px",height:"18px"}})),s(e(k),{style:{"font-size":"18px","font-weight":"500"}},{default:n(()=>[h(b(o.name),1)]),_:2},1024),p.value!==o.id?(a(),i(e(D),{key:0,size:"20"})):(a(),i(e(R),{key:1,style:{"font-size":"20px"}}))]),_:2},1024)]),_:2},1032,["class","onClick"]))),128))]),_:1}),s(x,{class:"watermark","page-id":"home",locale:e(c).state.workspace.language},null,8,["locale"])])):L("",!0)}}),me=N(O,[["__scopeId","data-v-4eb9c207"]]);export{me as default};
//# sourceMappingURL=Home-CAPLsm_1.js.map
