import{i as w}from"./metadata-ctvOOIHa.js";import{W as b}from"./Watermark-CfLukdlK.js";import{P as x}from"./PageStageView-DA6hvtAe.js";import{F as C}from"./PhArrowSquareOut.vue-DB9BQOUF.js";import{e as D,r as y,Q as I,b as P,f as m,j as z,v as r,p as e,w as n,D as g,n as i,q as _,t as h,l as V,b7 as k,M as F,X as S,ag as B,g as a,I as H,V as L,aO as N}from"./jwt-decode.esm-DFut-Yfu.js";import{u as T,f as W}from"./workspaceStore-QIT6AYST.js";import{C as j}from"./index-u5_LY22t.js";import{L as E}from"./LoadingOutlined-BxutEd8g.js";import"./PhCursorClick.vue-CmtbNJDB.js";import"./PhHouse.vue-BL40X3NJ.js";import"./PhMagnifyingGlass.vue-sycgItzp.js";import"./PhWebhooksLogo.vue-DNSbOXk7.js";import"./constants-CRK4P98p.js";import"./CircularLoading-D7SqYyu1.js";import"./userStore-CZ-V6SLh.js";import"./consoleCapture-BgFtZ5V1.js";import"./runnerData-CryDtGKF.js";import"./url-PygE0McV.js";import"./colorHelpers-DqehPK9O.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},l=new Error().stack;l&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[l]="d8b15b3c-2939-48a2-ad4c-6a8547caec90",s._sentryDebugIdIdentifier="sentry-dbid-d8b15b3c-2939-48a2-ad4c-6a8547caec90")}catch{}})();const M={key:0,class:"page-wrapper"},O={key:1,class:"home-container"},$=D({__name:"Home",setup(s){const l=B(),c=T(),d=y(null);I(async()=>{try{const t=await W();t?.type==="page"&&(d.value=t.data)}catch{}});const u=P(()=>c.state.workspace?.sidebar.filter(t=>t.id!=="home")||[]),p=y(null),v=async(t,f)=>{p.value=f,await l.push({path:`/${t}`}),p.value=null};return(t,f)=>d.value?(a(),m("div",M,[r(x,{"ui-data":d.value},null,8,["ui-data"])])):e(c).state.workspace?(a(),m("div",O,[r(e(g),{vertical:"",gap:"large",class:"cards-container"},{default:n(()=>[u.value.length===0?(a(),i(e(k),{key:0,type:"secondary",style:{"font-size":"18px"}},{default:n(()=>[_(h(e(V).translate("i18n_home_no_forms_available")),1)]),_:1})):(a(!0),m(F,{key:1},S(u.value,o=>(a(),i(e(j),{key:o.id,class:H(["form-card",{loading:p.value===o.id}]),"body-style":{cursor:"pointer"},onClick:q=>v(o.path,o.id)},{default:n(()=>[r(e(g),{gap:"large",align:"center",justify:"space-between"},{default:n(()=>[(a(),i(L(e(w)(o.type)),{style:{"flex-shrink":"0",width:"22px",height:"18px"}})),r(e(k),{style:{"font-size":"18px","font-weight":"500"}},{default:n(()=>[_(h(o.name),1)]),_:2},1024),p.value!==o.id?(a(),i(e(C),{key:0,size:"20"})):(a(),i(e(E),{key:1,style:{"font-size":"20px"}}))]),_:2},1024)]),_:2},1032,["class","onClick"]))),128))]),_:1}),r(b,{class:"watermark","page-id":"home",locale:e(c).state.workspace.language},null,8,["locale"])])):z("",!0)}}),ce=N($,[["__scopeId","data-v-e814c839"]]);export{ce as default};
//# sourceMappingURL=Home-CSZjkztV.js.map
