import{i as w}from"./metadata-nOgxPUSH.js";import{W as x}from"./Watermark-CKsaiHww.js";import{P as C}from"./PageStageView-DZhFrVNW.js";import{F as P}from"./PhArrowSquareOut.vue-DecnGV3o.js";import{L as D}from"./CircularLoading-CXx--eID.js";import{e as I,r as u,P as z,b as L,f as d,j as F,v as s,p as e,w as n,b5 as _,n as i,q as b,t as h,l as H,b6 as k,J as S,W as V,af as W,g as a,G as B,U as N,aM as T}from"./jwt-decode.esm-BqGP18yB.js";import{u as j,f as E}from"./workspaceStore-Cu41OBef.js";import{C as M}from"./index-B6oKVJ7y.js";import{L as $}from"./LoadingOutlined-DpobTUIS.js";import"./PhCursorClick.vue-CrK6Lq9l.js";import"./PhHouse.vue-DMDtCcF2.js";import"./PhMagnifyingGlass.vue-BeE9_Ai9.js";import"./PhWebhooksLogo.vue-df0uhhIX.js";import"./constants-CtuskQyt.js";import"./userStore-DcKmjdDx.js";import"./consoleCapture-jCr6g_yn.js";import"./runnerData-BpSzztKt.js";import"./url-YfJg_a8Q.js";import"./colorHelpers-5riH0JNn.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]="f32a8036-60b1-4bb7-bb04-b05ef3370704",r._sentryDebugIdIdentifier="sentry-dbid-f32a8036-60b1-4bb7-bb04-b05ef3370704")}catch{}})();const q={key:0,class:"home-container"},A={key:1,class:"page-wrapper"},G={key:2,class:"home-container"},J=I({__name:"Home",setup(r){const l=W(),c=j(),f=u(!0),m=u(null);z(async()=>{try{const t=await E();t?.type==="page"&&(m.value=t.data)}catch{}finally{f.value=!1}});const y=L(()=>c.state.workspace?.sidebar.filter(t=>t.id!=="home")||[]),p=u(null),v=async(t,g)=>{p.value=g,await l.push({path:`/${t}`}),p.value=null};return(t,g)=>f.value?(a(),d("div",q,[s(D)])):m.value?(a(),d("div",A,[s(C,{"ui-data":m.value},null,8,["ui-data"])])):e(c).state.workspace?(a(),d("div",G,[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(()=>[b(h(e(H).translate("i18n_home_no_forms_available")),1)]),_:1})):(a(!0),d(S,{key:1},V(y.value,o=>(a(),i(e(M),{key:o.id,class:B(["form-card",{loading:p.value===o.id}]),"body-style":{cursor:"pointer"},onClick:O=>v(o.path,o.id)},{default:n(()=>[s(e(_),{gap:"large",align:"center",justify:"space-between"},{default:n(()=>[(a(),i(N(e(w)(o.type)),{style:{"flex-shrink":"0",width:"22px",height:"18px"}})),s(e(k),{style:{"font-size":"18px","font-weight":"500"}},{default:n(()=>[b(h(o.name),1)]),_:2},1024),p.value!==o.id?(a(),i(e(P),{key:0,size:"20"})):(a(),i(e($),{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"])])):F("",!0)}}),me=T(J,[["__scopeId","data-v-4eb9c207"]]);export{me as default};
//# sourceMappingURL=Home-Cpjzz3ZS.js.map
