import{i as b}from"./metadata-9Sy_Y2Gz.js";import{W as x}from"./Watermark-BNe5HOS9.js";import{P as C}from"./PageStageView-DAPtpvJZ.js";import{F as D}from"./PhArrowSquareOut.vue-D4srLpe_.js";import{L as I}from"./CircularLoading-DSsC5jij.js";import{e as P,r as u,Q as z,b as L,f as p,j as V,v as s,p as e,w as n,D as _,n as i,q as h,t as k,l as F,b7 as v,M as H,X as S,ag as B,g as a,I as N,V as T,aO as W}from"./jwt-decode.esm-BYfS37aG.js";import{u as j,f as E}from"./workspaceStore-CMQaTfN3.js";import{C as M}from"./index-DwiPTllg.js";import{L as O}from"./LoadingOutlined-CyONonpC.js";import"./PhCursorClick.vue-mvNh3JMs.js";import"./PhHouse.vue-DRZ39az5.js";import"./PhMagnifyingGlass.vue-DmAWc16f.js";import"./PhWebhooksLogo.vue-2SCNyr8o.js";import"./constants-BEWVx_ZC.js";import"./userStore-ZzGDEfJ0.js";import"./consoleCapture-BPVon_ip.js";import"./runnerData-CFJzN8JX.js";import"./url-xbaQsfJ1.js";import"./colorHelpers-Dr5wl109.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]="6da5ad0d-e021-4842-aa2d-10da813f386b",r._sentryDebugIdIdentifier="sentry-dbid-6da5ad0d-e021-4842-aa2d-10da813f386b")}catch{}})();const $={key:0,class:"home-container"},q={key:1,class:"page-wrapper"},A={key:2,class:"home-container"},Q=P({__name:"Home",setup(r){const l=B(),d=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=L(()=>d.state.workspace?.sidebar.filter(t=>t.id!=="home")||[]),c=u(null),w=async(t,y)=>{c.value=y,await l.push({path:`/${t}`}),c.value=null};return(t,y)=>f.value?(a(),p("div",$,[s(I)])):m.value?(a(),p("div",q,[s(C,{"ui-data":m.value},null,8,["ui-data"])])):e(d).state.workspace?(a(),p("div",A,[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(F).translate("i18n_home_no_forms_available")),1)]),_:1})):(a(!0),p(H,{key:1},S(g.value,o=>(a(),i(e(M),{key:o.id,class:N(["form-card",{loading:c.value===o.id}]),"body-style":{cursor:"pointer"},onClick:R=>w(o.path,o.id)},{default:n(()=>[s(e(_),{gap:"large",align:"center",justify:"space-between"},{default:n(()=>[(a(),i(T(e(b)(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),c.value!==o.id?(a(),i(e(D),{key:0,size:"20"})):(a(),i(e(O),{key:1,style:{"font-size":"20px"}}))]),_:2},1024)]),_:2},1032,["class","onClick"]))),128))]),_:1}),s(x,{class:"watermark","page-id":"home",locale:e(d).state.workspace.language},null,8,["locale"])])):V("",!0)}}),me=W(Q,[["__scopeId","data-v-4eb9c207"]]);export{me as default};
//# sourceMappingURL=Home-CI6CcMAU.js.map
