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]=`8e83c216-0610-4b30-b267-51df06805dd5`,e._sentryDebugIdIdentifier=`sentry-dbid-8e83c216-0610-4b30-b267-51df06805dd5`)}catch{}import{Ag as e,H as t,Qh as n,Zm as r,_r as i,bi as a,ng as o}from"./entry.client-mpghtlrl.js";import{t as s}from"./GroupGamerpic-ixaynvir.js";import{t as c}from"./HorizontalProfileItem-nxlgww0q.js";var l=e(),u={entries:[{query:`LG_20`,size:{width:88},imageType:`jpg`},{query:`MD_20`,size:{width:72},imageType:`jpg`}],defaultEntry:{size:{width:56},imageType:`jpg`},breakpointContext:`window`},d={entries:[],defaultEntry:{size:{width:56},imageType:`jpg`}},f=o(),p=i(e=>{let n=(0,l.c)(20),{partyOwner:r,isInSameParty:i,isInviteOnly:o,onJoinPartyPress:p,partyMemberXuids:m}=e,h=a()===`low`?u:d,{locGamePartyJoinable:g,locUnknownUserParty:_,locPartyOwner:v,locInviteOnly:y,locAlreadyInParty:b}=t(),x;n[0]!==i||n[1]!==b||n[2]!==o||n[3]!==y||n[4]!==g?(x=i?b():o?y():g(),n[0]=i,n[1]=b,n[2]=o,n[3]=y,n[4]=g,n[5]=x):x=n[5];let S=x,C;n[6]!==r||n[7]!==v||n[8]!==_?(C=r?v(r.gamertag.uniqueGamertag):_(),n[6]=r,n[7]=v,n[8]=_,n[9]=C):C=n[9];let w;n[10]===m?w=n[11]:(w=m??[],n[10]=m,n[11]=w);let T;n[12]!==w||n[13]!==h?(T=(0,f.jsx)(s,{xuids:w,gamerpicImageConstraints:h,innerContentClassName:`!rounded-s-regular !rounded-e-none`}),n[12]=w,n[13]=h,n[14]=T):T=n[14];let E;return n[15]!==p||n[16]!==C||n[17]!==S||n[18]!==T?(E=(0,f.jsx)(c,{onClick:p,title:C,subtitle:S,contentClassName:`items-center`,imageContent:T,backgroundVisible:!0}),n[15]=p,n[16]=C,n[17]=S,n[18]=T,n[19]=E):E=n[19],E},({partyId:e,onJoinPartyPress:t})=>{let{nonMemberParties:i,activeParty:a,profile:o}=r(),{data:s}=n(i.queries.publicPartyDetails.getActiveUserQuery().getOptions(e)),{data:c}=n(a.queries.partySessionId.getActiveUserQuery().getOptions()),l=c===e,u=s?.joinability===`inviteOnly`,d=s?.members.map(e=>e.userId.toString()),f=s?.members.find(e=>e.role===`owner`)?.userId.toString(),{data:p}=n({...o.queries.person.getActiveUserQuery().getOptions({xuid:f}),enabled:!!f});return{partyOwner:p,isInviteOnly:u,isInSameParty:l,partyMemberXuids:d?Array.from(d):void 0,onJoinPartyPress:()=>{t({isInSameParty:l,partyId:e})}}});export{d as n,u as r,p as t};