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]=`27b0ffab-9a43-423a-909c-dd8897bb4841`,e._sentryDebugIdIdentifier=`sentry-dbid-27b0ffab-9a43-423a-909c-dd8897bb4841`)}catch{}import{E as e}from"./vendor-misc-dys7qi6h.js";import{Ag as t,Gu as n,Mi as r,Oi as i,Qh as a,Zm as o,_r as s,ng as c}from"./entry.client-mpghtlrl.js";var l=t(),u=c(),d=e=>{let t=(0,l.c)(2),{inviteHost:n,isPending:r,isError:i,gameTitle:a}=e,o=r?`Loading...`:i?`Error loading invite details.`:`Invite from ${n} to play ${a}`,s;return t[0]===o?s=t[1]:(s=(0,u.jsx)(`div`,{className:`text-item-visible-container-default-content-primary-rest type-body`,children:o}),t[0]=o,t[1]=s),s},f=s(d,({token:e})=>{let{catalog:t,inviteLinks:n}=o(),{data:r,isPending:i,isError:s}=a(n.queries.activityInviteDetails.getActiveUserQuery().getOptions(e)),c=r===`revoked`,l=c?void 0:r,{data:u,isPending:d,isError:f}=a({...t.getBasicProductInfoQueryOptions(l?.titleId.toString()??``,`XboxTitleId`),enabled:l?.titleId!==void 0});return{inviteHost:l?.host.uniqueGamertag,isPending:i||d&&l?.titleId!==void 0,isError:s||f||c,gameTitle:u?.title}}),p=i(()=>{let{token:t}=e(n.share.gameInvite);if(!t)throw Error();return(0,u.jsx)(r,{location:`GameInvitePage`,children:(0,u.jsx)(f.useComponent(),{token:t})})},`GameInvitePage`);export{d as n,p as t};