try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`54a8771f-0e0f-4b9f-863c-68871e304feb`,e._sentryDebugIdIdentifier=`sentry-dbid-54a8771f-0e0f-4b9f-863c-68871e304feb`)}catch{}import"./rolldown-runtime-nx40z1zs.js";import{Ag as e,Yh as t,Zm as n,_r as r,mp as i,ng as a,op as o}from"./entry.client-mpghtlrl.js";import{rr as s}from"./xds-icons-m106f2fc.js";import{n as c,r as l}from"./useWidget-nf2epnjz.js";import{t as u}from"./useWidgetNavigation-os2rjdn1.js";import{t as d}from"./WidgetInteractable-mzv6xcil.js";import{n as f,o as p}from"./data-k1o1noin.js";var m=e(),h=a(),g=e=>{let t=(0,m.c)(13),{navigate:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={from:o.widget.conversations.members.id},t[0]=r):r=t[0];let{conversationId:a}=i(r),f=p[a],g=f?.name??a,_,v=`Members of ${g}`,C;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,h.jsx)(s,{}),t[1]=C):C=t[1];let w;t[2]===v?w=t[3]:(w={title:v,shortTitle:`Members`,icon:C},t[2]=v,t[3]=w),_=w,l(_);let T=(f?.memberXuids??[]).map(y).filter(Boolean),E;t[4]===n?E=t[5]:(E={getNavigateParams:b,getHeader:x,navigate:n},t[4]=n,t[5]=E);let{isReady:D,getItemProps:O}=u(E),{visibility:k}=c();if(!D||k===`hidden`)return null;let A=S,j=f?.name??a,M;t[6]===j?M=t[7]:(M=(0,h.jsxs)(`p`,{className:`px-1 text-xs text-white/60`,children:[`Members of `,j]}),t[6]=j,t[7]=M);let N;t[8]===O?N=t[9]:(N=e=>(0,h.jsxs)(d,{className:`group flex cursor-pointer items-center gap-3 rounded bg-white/5 p-3 text-start hover:bg-white/10`,...O(e),children:[(0,h.jsxs)(`div`,{className:`relative flex-shrink-0`,children:[(0,h.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-full bg-gradient-to-br ${e.gradient} text-lg font-bold`,children:e.gamertag.charAt(0)}),(0,h.jsx)(`div`,{className:`absolute bottom-0 end-0 h-3 w-3 rounded-full border-2 border-black ${A(e.status)}`})]}),(0,h.jsxs)(`div`,{className:`flex flex-1 flex-col gap-0.5 overflow-hidden`,children:[(0,h.jsx)(`span`,{className:`truncate font-semibold`,children:e.gamertag}),(0,h.jsx)(`span`,{className:`truncate text-xs text-white/60`,children:e.activity}),(0,h.jsxs)(`span`,{className:`text-xs text-white/40`,children:[e.gamerscore.toLocaleString(),`G`]})]})]},e.xuid),t[8]=O,t[9]=N);let P=T.map(N),F;return t[10]!==M||t[11]!==P?(F=(0,h.jsxs)(`div`,{className:`flex h-full w-full flex-col gap-2 p-2`,children:[M,P]}),t[10]=M,t[11]=P,t[12]=F):F=t[12],F},_=r(g,()=>{let{router:e}=n(),{mutate:r}=t(e.mutations.navigate.getOptions());return{navigate:r}}),v=()=>{let e=(0,m.c)(2),t=_.useComponent(),n;return e[0]===t?n=e[1]:(n=(0,h.jsx)(t,{}),e[0]=t,e[1]=n),n};function y(e){return f[e]}function b(e,t){return{key:t,to:o.widget.friends.byId.id,params:{friendId:e.xuid}}}function x(e){return{title:e.gamertag}}function S(e){return e===`online`?`bg-green-500`:e===`away`?`bg-yellow-500`:`bg-gray-500`}export{v as Members,_ as MembersConnection,g as PureMembers};