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]=`2d4d6b22-33e9-483d-9e46-c24ab7cf0bbc`,e._sentryDebugIdIdentifier=`sentry-dbid-2d4d6b22-33e9-483d-9e46-c24ab7cf0bbc`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Ag as t,Dg as n,Dr as r,Fg as i,Ig as a,dn as o,eh as s,mr as c,qp as l,sh as u,zp as d}from"./entry.client-dr7r6s9a.js";import{t as f}from"./HorizontalSocialItem-en4pxu2j.js";import{t as p}from"./HorizontalSocialItemLoading-m0axsm2y.js";import{t as m}from"./ContainerVirtualGrid-db88vdpo.js";import{t as h}from"./guideRouterEnvironmentHooks-gdtmgzra.js";import{t as g}from"./useChatStrings-ddn3ault.js";import{t as _}from"./GuidePageLayout-imh16gdu.js";import{t as v}from"./useDeferRestore-dt4p0xnv.js";import{t as y}from"./GuideIllustration-ox8r1eop.js";import{t as b}from"./GuideL2Header-b90pi17a.js";var x=i(),S=e(a(),1),C=t(),w=o(e=>{let t=(0,x.c)(19),{members:n,ownerXuid:i,isLoading:a,onPress:o}=e,{locGenericErrorSubheading:c}=s(),{locGroupMembersLoadFailure:l}=g();if(v(a),r(a),n){let e;t[0]===i?e=t[1]:(e=(e,t)=>{if(e.xuid===i)return-1;if(t.xuid===i)return 1;let n=e.presence?.presenceState===`online`,r=t.presence?.presenceState===`online`;return n&&!r?-1:!n&&r?1:e.gamertag.uniqueGamertag.localeCompare(t.gamertag.uniqueGamertag)},t[0]=i,t[1]=e);let r=e,a;t[2]!==n||t[3]!==r?(a=[...n].sort(r),t[2]=n,t[3]=r,t[4]=a):a=t[4];let s=a,c;t[5]!==o||t[6]!==i?(c=e=>(0,C.jsx)(f,{xuid:e.xuid,onPress:()=>o(e.xuid),version:e.xuid===i?`groupOwner`:`noSuffix`,background:`invisible`},e.xuid),t[5]=o,t[6]=i,t[7]=c):c=t[7];let l;return t[8]!==s||t[9]!==c?(l=(0,C.jsx)(m,{items:s,renderItem:c,columns:1,overscan:5,gapSize:`var(--V1VF)`}),t[8]=s,t[9]=c,t[10]=l):l=t[10],l}else if(a){let e;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,C.jsx)(`div`,{className:`flex max-h-full flex-col gap-layout-vertical-group-of-items-tight overflow-y-hidden`,children:Array.from({length:15},E)}),t[11]=e):e=t[11],e}else{let e;t[12]===l?e=t[13]:(e=l(),t[12]=l,t[13]=e);let n;t[14]===c?n=t[15]:(n=c(),t[14]=c,t[15]=n);let r;return t[16]!==e||t[17]!==n?(r=(0,C.jsx)(y,{title:e,subtitle:n,illustrationType:`error`}),t[16]=e,t[17]=n,t[18]=r):r=t[18],r}},()=>{let{conversation:e,profile:t}=u(),{groupId:r}=l({from:d.dialog.guide.chat.groupMembers.id}),{data:i,isLoading:a,isError:o}=n(e.queries.group.getActiveUserQuery().getOptions({groupId:r})),{data:s,isLoading:c,isError:f}=n({...t.queries.people.getActiveUserQuery().getOptions({xuids:i?.participantXuids??[]}),enabled:!!i}),p=h(),m=(0,S.useCallback)(e=>{p({to:d.dialog.guide.people.profileCard.fullPath,params:{xuid:e}})},[p]);return{members:s,ownerXuid:i?.ownerXuid,onPress:m,isLoading:a||c,isError:o||f}}),T=c(()=>(0,C.jsx)(w.useComponent(),{}),`GroupMembersList`);function E(e,t){return(0,C.jsx)(p,{includeContainer:!0},t)}var D=c(()=>{let{locGroupMembersHeader:e}=g();return(0,C.jsx)(_,{id:`guide-group-members`,header:(0,C.jsx)(b,{title:e()}),contentClassName:`gap-layout-vertical-related-content-in-a-section-tight`,children:(0,C.jsx)(T,{})})},`GroupMembersPage`);export{D as GroupMembersPage,D as default};