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]=`e4b2333e-06b5-4387-a262-d4230b496b46`,e._sentryDebugIdIdentifier=`sentry-dbid-e4b2333e-06b5-4387-a262-d4230b496b46`)}catch{}import{Ag as e,Dg as t,Fg as n,dn as r,dr as i,k as a,sh as o}from"./entry.client-dr7r6s9a.js";import{t as s}from"./GroupGamerpic-cgh0j1sv.js";import{t as c}from"./HorizontalProfileItem-c9hkkgc7.js";var l=n(),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=e(),p=r(e=>{let t=(0,l.c)(20),{partyOwner:n,isInSameParty:r,isInviteOnly:o,onJoinPartyPress:p,partyMemberXuids:m}=e,h=i()===`low`?u:d,{locGamePartyJoinable:g,locUnknownUserParty:_,locPartyOwner:v,locInviteOnly:y,locAlreadyInParty:b}=a(),x;t[0]!==r||t[1]!==b||t[2]!==o||t[3]!==y||t[4]!==g?(x=r?b():o?y():g(),t[0]=r,t[1]=b,t[2]=o,t[3]=y,t[4]=g,t[5]=x):x=t[5];let S=x,C;t[6]!==n||t[7]!==v||t[8]!==_?(C=n?v(n.gamertag.uniqueGamertag):_(),t[6]=n,t[7]=v,t[8]=_,t[9]=C):C=t[9];let w;t[10]===m?w=t[11]:(w=m??[],t[10]=m,t[11]=w);let T;t[12]!==w||t[13]!==h?(T=(0,f.jsx)(s,{xuids:w,gamerpicImageConstraints:h,innerContentClassName:`!rounded-s-regular !rounded-e-none`}),t[12]=w,t[13]=h,t[14]=T):T=t[14];let E;return t[15]!==p||t[16]!==C||t[17]!==S||t[18]!==T?(E=(0,f.jsx)(c,{onClick:p,title:C,subtitle:S,contentClassName:`items-center`,imageContent:T,backgroundVisible:!0}),t[15]=p,t[16]=C,t[17]=S,t[18]=T,t[19]=E):E=t[19],E},({partyId:e,onJoinPartyPress:n})=>{let{nonMemberParties:r,activeParty:i,profile:a}=o(),{data:s}=t(r.queries.publicPartyDetails.getActiveUserQuery().getOptions(e)),{data:c}=t(i.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}=t({...a.queries.person.getActiveUserQuery().getOptions({xuid:f}),enabled:!!f});return{partyOwner:p,isInviteOnly:u,isInSameParty:l,partyMemberXuids:d?Array.from(d):void 0,onJoinPartyPress:()=>{n({isInSameParty:l,partyId:e})}}});export{d as n,u as r,p as t};