import{i as v}from"./metadata-0JQnRzMV.js";import{W as w}from"./Watermark-BVgdxgEk.js";import{P as x}from"./PageStageView-BCgPEw6p.js";import{F as C}from"./PhArrowSquareOut.vue-BidOwVXL.js";import{e as D,r as y,S as I,b as P,f as m,j as z,v as r,p as e,w as n,E as g,n as i,q as _,t as h,l as S,b7 as k,O as F,Z as V,ag as B,g as a,K as E,X as H,aO as L}from"./jwt-decode.esm-CzNJpMna.js";import{u as N,f as O}from"./workspaceStore-CfaRGIsm.js";import{C as T}from"./index-zwdtp9eM.js";import{L as W}from"./LoadingOutlined-C_g2Yr72.js";import"./PhCursorClick.vue-BJXHzSPd.js";import"./PhHouse.vue-CSPrR4xv.js";import"./PhMagnifyingGlass.vue-BGNgpZ6K.js";import"./PhWebhooksLogo.vue-BuSFJJka.js";import"./constants-CmgnxxPp.js";import"./CircularLoading-CkYtte64.js";import"./userStore-awX4g_0u.js";import"./runnerData-y7ODBKD6.js";import"./url-DUHlB_Eu.js";import"./colorHelpers-DqllhzUB.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]="81882749-b7c1-4293-9991-cb3ee1cb222f",s._sentryDebugIdIdentifier="sentry-dbid-81882749-b7c1-4293-9991-cb3ee1cb222f")}catch{}})();const j={key:0,class:"page-wrapper"},$={key:1,class:"home-container"},q=D({__name:"Home",setup(s){const l=B(),c=N(),d=y(null);I(async()=>{try{const t=await O();t?.type==="page"&&(d.value=t.data)}catch{}});const u=P(()=>c.state.workspace?.sidebar.filter(t=>t.id!=="home")||[]),p=y(null),b=async(t,f)=>{p.value=f,await l.push({path:`/${t}`}),p.value=null};return(t,f)=>d.value?(a(),m("div",j,[r(x,{"ui-data":d.value},null,8,["ui-data"])])):e(c).state.workspace?(a(),m("div",$,[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(S).translate("i18n_home_no_forms_available")),1)]),_:1})):(a(!0),m(F,{key:1},V(u.value,o=>(a(),i(e(T),{key:o.id,class:E(["form-card",{loading:p.value===o.id}]),"body-style":{cursor:"pointer"},onClick:A=>b(o.path,o.id)},{default:n(()=>[r(e(g),{gap:"large",align:"center",justify:"space-between"},{default:n(()=>[(a(),i(H(e(v)(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(W),{key:1,style:{"font-size":"20px"}}))]),_:2},1024)]),_:2},1032,["class","onClick"]))),128))]),_:1}),r(w,{class:"watermark","page-id":"home",locale:e(c).state.workspace.language},null,8,["locale"])])):z("",!0)}}),le=L(q,[["__scopeId","data-v-e814c839"]]);export{le as default};
//# sourceMappingURL=Home-DzI1KNBe.js.map
