import{i as w}from"./metadata-Cfx0fjM3.js";import{W as x}from"./Watermark-DjDnHfrp.js";import{P as C}from"./PageStageView-Ifl3m5Mh.js";import{F as D}from"./PhArrowSquareOut.vue-kZobp0n8.js";import{L as I}from"./CircularLoading-ylUWWooD.js";import{e as P,r as u,Q as z,b as H,f as d,j as L,v as s,p as e,w as n,C as _,n as i,q as h,t as k,l as V,b7 as v,K as F,X as S,ag as B,g as a,H as N,V as T,aO as W}from"./jwt-decode.esm-CW-ehmUm.js";import{u as j,f as E}from"./workspaceStore-DcnxpW_c.js";import{C as O}from"./index-Dg2ckLRl.js";import{L as $}from"./LoadingOutlined-CAW-snM0.js";import"./PhCursorClick.vue-KsF_VmxQ.js";import"./PhHouse.vue-CsA_UCyD.js";import"./PhMagnifyingGlass.vue-CedOSv9d.js";import"./PhWebhooksLogo.vue-BILteujJ.js";import"./constants-N9y8G168.js";import"./userStore-C91zXrXx.js";import"./consoleCapture-DPCsPq9K.js";import"./runnerData-B-rwjNHa.js";import"./url-AFSWCooG.js";import"./colorHelpers-9BBJQtv0.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]="be2bae02-333e-481e-af0c-8979ba7c5e98",r._sentryDebugIdIdentifier="sentry-dbid-be2bae02-333e-481e-af0c-8979ba7c5e98")}catch{}})();const q={key:0,class:"home-container"},A={key:1,class:"page-wrapper"},K={key:2,class:"home-container"},M=P({__name:"Home",setup(r){const l=B(),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 g=H(()=>c.state.workspace?.sidebar.filter(t=>t.id!=="home")||[]),p=u(null),b=async(t,y)=>{p.value=y,await l.push({path:`/${t}`}),p.value=null};return(t,y)=>f.value?(a(),d("div",q,[s(I)])):m.value?(a(),d("div",A,[s(C,{"ui-data":m.value},null,8,["ui-data"])])):e(c).state.workspace?(a(),d("div",K,[s(e(_),{vertical:"",gap:"large",class:"cards-container"},{default:n(()=>[g.value.length===0?(a(),i(e(v),{key:0,type:"secondary",style:{"font-size":"18px"}},{default:n(()=>[h(k(e(V).translate("i18n_home_no_forms_available")),1)]),_:1})):(a(!0),d(F,{key:1},S(g.value,o=>(a(),i(e(O),{key:o.id,class:N(["form-card",{loading:p.value===o.id}]),"body-style":{cursor:"pointer"},onClick:Q=>b(o.path,o.id)},{default:n(()=>[s(e(_),{gap:"large",align:"center",justify:"space-between"},{default:n(()=>[(a(),i(T(e(w)(o.type)),{style:{"flex-shrink":"0",width:"22px",height:"18px"}})),s(e(v),{style:{"font-size":"18px","font-weight":"500"}},{default:n(()=>[h(k(o.name),1)]),_:2},1024),p.value!==o.id?(a(),i(e(D),{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"])])):L("",!0)}}),me=W(M,[["__scopeId","data-v-4eb9c207"]]);export{me as default};
//# sourceMappingURL=Home-kK1vUEF4.js.map
