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]=`345477a2-8600-4444-a4b2-3a031ed9a91b`,e._sentryDebugIdIdentifier=`sentry-dbid-345477a2-8600-4444-a4b2-3a031ed9a91b`)}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),{onAcceptInvite:n,senderXuid: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},({inviteId:e,inviteExpirationMs:t,timestampMsWhenSent:r,senderGamertagBase:i,senderGamertagSuffix:a,senderXuid:o})=>{let{activeParty:d,nonMemberParties:f}=s(),{mutate:p}=c(d.mutations.acceptInvite.getActiveUserMutation().getOptions()),{data:m}=n(f.queries.partyAcceptInviteStatus.getActiveUserQuery().getOptions({inviteId:e,inviteExpirationMs:t,timestampMsWhenSent:r})),h=a?`${i}#${a}`:i,g=u();return{onAcceptInvite:n=>{if(m===`blockedByUnsupportedClient`){g({to:l.dialog.guide.jump.partyChatUnavailable.fullPath});return}p({acceptInviteConfig:{inviteId:e,inviteExpirationMs:t,timestampMsWhenSent:r,senderGamertag:h},shouldEnableMic:n}),g({to:l.dialog.guide.jump.activeParty.fullPath,search:{view:`people`},replace:!0})},senderXuid:o,partyJoinStatus:m}}),v=i(e=>(0,g.jsx)(f,{...e}),({inviteId:e,inviteExpirationMs:t,timestampMsWhenSent:r})=>{let{nonMemberParties:i}=s(),{data:a,isPending:o,isError:c}=n(i.queries.invitePartyDetails.getActiveUserQuery().getOptions({inviteId:e,timestampMsWhenSent:r,inviteExpirationMs:t})),d=u();return{partyDetails:a,isPartyDetailsPending:o,isPartyDetailsError:c,onUserPress:e=>{d({to:l.dialog.guide.people.profileCard.fullPath,params:{xuid:e}})}}}),y=t=>{let n=(0,h.c)(22),{inviteId:r,inviteExpirationMs:i,timestampMsWhenSent:a,senderXuid:o,senderGamertagBase:s,senderGamertagSuffix:c}=t,l=_.useComponent(),u=v.useComponent(),f;n[0]!==o||n[1]!==s||n[2]!==c?(f=(0,g.jsx)(m,{partyMemberXuid:o,partyMemberGamertagBase:s,partyMemberGamertagSuffix:c,previewType:`invite`}),n[0]=o,n[1]=s,n[2]=c,n[3]=f):f=n[3];let p;n[4]!==l||n[5]!==r||n[6]!==i||n[7]!==a||n[8]!==s||n[9]!==c||n[10]!==o?(p=(0,g.jsx)(l,{inviteId:r,inviteExpirationMs:i,timestampMsWhenSent:a,senderGamertagBase:s,senderGamertagSuffix:c,senderXuid:o}),n[4]=l,n[5]=r,n[6]=i,n[7]=a,n[8]=s,n[9]=c,n[10]=o,n[11]=p):p=n[11];let y;n[12]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,g.jsx)(e,{variant:`subtle`,className:`my-layout-vertical-group-of-items-regular`}),n[12]=y):y=n[12];let b;n[13]!==u||n[14]!==r||n[15]!==i||n[16]!==a?(b=(0,g.jsx)(u,{inviteId:r,inviteExpirationMs:i,timestampMsWhenSent:a}),n[13]=u,n[14]=r,n[15]=i,n[16]=a,n[17]=b):b=n[17];let x;return n[18]!==f||n[19]!==p||n[20]!==b?(x=(0,g.jsxs)(d,{id:`guide-party-invite-preview-page`,header:f,children:[p,y,b]}),n[18]=f,n[19]=p,n[20]=b,n[21]=x):x=n[21],x},b=a(()=>{let{inviteId:e,inviteExpirationMs:t,timestampMsWhenSent:n,senderXuid:r,senderGamertagBase:i,senderGamertagSuffix:a}=o({from:l.dialog.guide.jump.partyInvitePreview.id});return(0,g.jsx)(y,{inviteId:e,inviteExpirationMs:t,timestampMsWhenSent:n,senderXuid:r,senderGamertagBase:i,senderGamertagSuffix:a===`undefined`?void 0:a})},`PartyInvitePreviewPage`);export{b as PartyInvitePreviewPage,b as default,y as PurePartyInvitePreviewPage};