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]=`61a0e1d9-1b2b-49f8-997e-4ea1ba56bc9d`,e._sentryDebugIdIdentifier=`sentry-dbid-61a0e1d9-1b2b-49f8-997e-4ea1ba56bc9d`)}catch{}import"./rolldown-runtime-nx40z1zs.js";import{$m as e,Ag as t,Hm as n,Oi as r,Qh as i,Zm as a,_r as o,ng as s}from"./entry.client-mpghtlrl.js";import{n as c,t as l}from"./LoadingParty-bxsummv7.js";import{t as u}from"./GuidePageLayout-eh7novzv.js";import{t as d}from"./GuideIllustration-pex5y7xc.js";import{t as f}from"./GuideL2Header-a2pogkf0.js";var p=t(),m=s(),h=o(t=>{let r=(0,p.c)(26),{partyError:i}=t,{locGenericErrorSubheading:a}=n(),{t:o}=e(`GuideActivePartyPage`),s;r[0]===o?s=r[1]:(s=o(`We can't add you to the party right now`,{shortKey:`cannot_add_to_party`}),r[0]=o,r[1]=s);let c=s,l=``;if(i)bb0:switch(i.type){case`PartyConnectionError`:if(i.errorType===`createParty`){let e;r[2]===o?e=r[3]:(e=o(`We're unable to create a new party right now`,{shortKey:`cannot_create_party`}),r[2]=o,r[3]=e),l=e}else l=c;break bb0;case`PartyAcceptInviteError`:if(i.errorType===`inviteLessThanDayOldExpired`){let e;r[4]!==i.senderGamertag||r[5]!==o?(e=o(`This party invite has expired. Ask {senderGamertag} to send a new invite!`,{shortKey:`party_invite_expired_recently`,values:{senderGamertag:i.senderGamertag}}),r[4]=i.senderGamertag,r[5]=o,r[6]=e):e=r[6],l=e}else{let e;r[7]!==i.senderGamertag||r[8]!==o?(e=o(`This party invite from {senderGamertag} has expired`,{shortKey:`party_invite_expired_old`,values:{senderGamertag:i.senderGamertag}}),r[7]=i.senderGamertag,r[8]=o,r[9]=e):e=r[9],l=e}break bb0;case`PartyDisconnectedError`:if(i.reason===`kick`){let e;r[10]===o?e=r[11]:(e=o(`You were removed from the party`,{shortKey:`removed_from_party`}),r[10]=o,r[11]=e),l=e}else{let e;r[12]===o?e=r[13]:(e=o(`You were disconnected from the party`,{shortKey:`disconnected_from_party`}),r[12]=o,r[13]=e),l=e}break bb0;default:l=c}else i===null&&(l=c);let h;r[14]===o?h=r[15]:(h=o(`Party error`,{shortKey:`party_error_dialog_description`}),r[14]=o,r[15]=h);let g=h,_;r[16]===g?_=r[17]:(_=(0,m.jsx)(f,{description:g}),r[16]=g,r[17]=_);let v=l,y;r[18]===a?y=r[19]:(y=a(),r[18]=a,r[19]=y);let b;r[20]!==l||r[21]!==y?(b=(0,m.jsx)(d,{title:v,subtitle:y,illustrationType:`error`}),r[20]=l,r[21]=y,r[22]=b):b=r[22];let x;return r[23]!==_||r[24]!==b?(x=(0,m.jsx)(u,{id:`guide-party-error`,header:_,children:b}),r[23]=_,r[24]=b,r[25]=x):x=r[25],x},({error:e})=>{let{activeParty:t}=a(),{data:n}=i(t.queries.partyError.getActiveUserQuery().getOptions(e));return{partyError:n}}),g=e=>{let t=(0,p.c)(6),{currentPartySession:n,isFetching:r,error:i}=e,a=c.useComponent(),o=h.useComponent();if(i&&!r){let e;return t[0]!==o||t[1]!==i?(e=(0,m.jsx)(o,{error:i}),t[0]=o,t[1]=i,t[2]=e):e=t[2],e}else if(n&&!r){let e;return t[3]===a?e=t[4]:(e=(0,m.jsx)(a,{}),t[3]=a,t[4]=e),e}else{let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,m.jsx)(l,{}),t[5]=e):e=t[5],e}},_=o(g,()=>{let{activeParty:e}=a(),{data:t,isFetching:n,error:r}=i(e.queries.currentPartySession.getActiveUserQuery().getOptions());return{currentPartySession:t,isFetching:n,error:r}}),v=r(()=>(0,m.jsx)(_.useComponent(),{}),`ActivePartyPage`);export{v as ActivePartyPage,v as default,_ as ActivePartyPageConnection,g as PureActivePartyPage};