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]=`d92fb228-62e5-407b-8f4a-012553ea6ff5`,e._sentryDebugIdIdentifier=`sentry-dbid-d92fb228-62e5-407b-8f4a-012553ea6ff5`)}catch{}import"./rolldown-runtime-eb2nym32.js";import{B as e}from"./xds-react-components-lks62tbl.js";import{Ag as t,Dg as n,Fg as r,dn as i,mr as a,qp as o,sh as s,wg as c,zp as l}from"./entry.client-dr7r6s9a.js";import{t as u}from"./guideRouterEnvironmentHooks-gdtmgzra.js";import{t as d}from"./GuidePageLayout-imh16gdu.js";import{n as f,r as p,t as m}from"./PreviewHeader-oeio7w32.js";var h=r(),g=t(),_=i(e=>{let t=(0,h.c)(5),{onJoin:n,friendXuid:r,partyJoinStatus:i}=e,a=p.useComponent(),o;return t[0]!==a||t[1]!==n||t[2]!==r||t[3]!==i?(o=(0,g.jsx)(a,{onJoinParty:n,xuid:r,partyJoinStatus:i}),t[0]=a,t[1]=n,t[2]=r,t[3]=i,t[4]=o):o=t[4],o},({partyId:e,friendXuid:t})=>{let{activeParty:r,nonMemberParties:i}=s(),{mutate:a}=c(r.mutations.joinParty.getActiveUserMutation().getOptions()),{data:o}=n(i.queries.partyJoinStatus.getActiveUserQuery().getOptions(e)),d=u();return{onJoin:t=>{if(o===`blockedByUnsupportedClient`){d({to:l.dialog.guide.jump.partyChatUnavailable.fullPath});return}a({sessionConfig:{partySessionId:e},shouldEnableMic:t}),d({to:l.dialog.guide.jump.activeParty.fullPath,search:{view:`people`},replace:!0})},friendXuid:t,partyJoinStatus:o}}),v=i(e=>(0,g.jsx)(f,{...e}),({partyId:e})=>{let{nonMemberParties:t}=s(),{data:r,isPending:i,isError:a}=n(t.queries.publicPartyDetails.getActiveUserQuery().getOptions(e)),o=u();return{partyDetails:r,isPartyDetailsPending:i,isPartyDetailsError:a,onUserPress:e=>{o({to:l.dialog.guide.people.profileCard.fullPath,params:{xuid:e}})}}}),y=t=>{let n=(0,h.c)(16),{partyId:r,friendXuid:i,friendGamertagBase:a,friendGamertagSuffix:o}=t,s=_.useComponent(),c=v.useComponent(),l;n[0]!==i||n[1]!==a||n[2]!==o?(l=(0,g.jsx)(m,{partyMemberXuid:i,partyMemberGamertagBase:a,partyMemberGamertagSuffix:o,previewType:`join`}),n[0]=i,n[1]=a,n[2]=o,n[3]=l):l=n[3];let u;n[4]!==s||n[5]!==r||n[6]!==i?(u=(0,g.jsx)(s,{partyId:r,friendXuid:i}),n[4]=s,n[5]=r,n[6]=i,n[7]=u):u=n[7];let f;n[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,g.jsx)(e,{variant:`subtle`,className:`my-layout-vertical-group-of-items-regular`}),n[8]=f):f=n[8];let p;n[9]!==c||n[10]!==r?(p=(0,g.jsx)(c,{partyId:r}),n[9]=c,n[10]=r,n[11]=p):p=n[11];let y;return n[12]!==l||n[13]!==u||n[14]!==p?(y=(0,g.jsxs)(d,{id:`guide-party-join-preview-page`,header:l,children:[u,f,p]}),n[12]=l,n[13]=u,n[14]=p,n[15]=y):y=n[15],y},b=a(()=>{let{partyId:e,friendXuid:t,friendGamertagBase:n,friendGamertagSuffix:r}=o({from:l.dialog.guide.jump.partyJoinPreview.id});return(0,g.jsx)(y,{partyId:e,friendXuid:t,friendGamertagBase:n,friendGamertagSuffix:r===`undefined`?void 0:r})},`PartyJoinPreviewPage`);export{b as PartyJoinPreviewPage,b as default,y as PurePartyJoinPreviewPage};