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]=`1a8de894-797a-4e5f-9486-d9d304d98caa`,e._sentryDebugIdIdentifier=`sentry-dbid-1a8de894-797a-4e5f-9486-d9d304d98caa`)}catch{}import"./rolldown-runtime-nx40z1zs.js";import{Ag as e,Oi as t,Qh as n,Yh as r,Zm as i,_r as a,mp as o,ng as s,op as c}from"./entry.client-mpghtlrl.js";import{pt as l}from"./xds-react-components-ihgca01z.js";import{t as u}from"./guideRouterEnvironmentHooks-h2xlfina.js";import{t as d}from"./GuidePageLayout-eh7novzv.js";import{n as f,r as p,t as m}from"./PreviewHeader-lc7w9ftr.js";var h=e(),g=s(),_=a(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:a,nonMemberParties:o}=i(),{mutate:s}=r(a.mutations.joinParty.getActiveUserMutation().getOptions()),{data:l}=n(o.queries.partyJoinStatus.getActiveUserQuery().getOptions(e)),d=u();return{onJoin:t=>{if(l===`blockedByUnsupportedClient`){d({to:c.dialog.guide.jump.partyChatUnavailable.fullPath});return}s({sessionConfig:{partySessionId:e},shouldEnableMic:t}),d({to:c.dialog.guide.jump.activeParty.fullPath,search:{view:`people`},replace:!0})},friendXuid:t,partyJoinStatus:l}}),v=a(e=>(0,g.jsx)(f,{...e}),({partyId:e})=>{let{nonMemberParties:t}=i(),{data:r,isPending:a,isError:o}=n(t.queries.publicPartyDetails.getActiveUserQuery().getOptions(e)),s=u();return{partyDetails:r,isPartyDetailsPending:a,isPartyDetailsError:o,onUserPress:e=>{s({to:c.dialog.guide.people.profileCard.fullPath,params:{xuid:e}})}}}),y=e=>{let t=(0,h.c)(16),{partyId:n,friendXuid:r,friendGamertagBase:i,friendGamertagSuffix:a}=e,o=_.useComponent(),s=v.useComponent(),c;t[0]!==r||t[1]!==i||t[2]!==a?(c=(0,g.jsx)(m,{partyMemberXuid:r,partyMemberGamertagBase:i,partyMemberGamertagSuffix:a,previewType:`join`}),t[0]=r,t[1]=i,t[2]=a,t[3]=c):c=t[3];let u;t[4]!==o||t[5]!==n||t[6]!==r?(u=(0,g.jsx)(o,{partyId:n,friendXuid:r}),t[4]=o,t[5]=n,t[6]=r,t[7]=u):u=t[7];let f;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,g.jsx)(l,{variant:`subtle`,className:`mx-internal-container-padding-tight my-layout-vertical-group-of-items-regular`}),t[8]=f):f=t[8];let p;t[9]!==s||t[10]!==n?(p=(0,g.jsx)(s,{partyId:n}),t[9]=s,t[10]=n,t[11]=p):p=t[11];let y;return t[12]!==c||t[13]!==u||t[14]!==p?(y=(0,g.jsxs)(d,{id:`guide-party-join-preview-page`,header:c,children:[u,f,p]}),t[12]=c,t[13]=u,t[14]=p,t[15]=y):y=t[15],y},b=t(()=>{let{partyId:e,friendXuid:t,friendGamertagBase:n,friendGamertagSuffix:r}=o({from:c.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};