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