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]=`5c359e81-6450-4b82-8fb1-173ca294c396`,e._sentryDebugIdIdentifier=`sentry-dbid-5c359e81-6450-4b82-8fb1-173ca294c396`)}catch{}import"./rolldown-runtime-eb2nym32.js";import{z as e}from"./vendor-misc-hfpbxrii.js";import{$d as t,Ag as n,Dg as r,Fg as i,Ym as a,dn as o,mr as s,sh as c,vr as l}from"./entry.client-dr7r6s9a.js";var u=i(),d=n(),f=o(e=>{let t=(0,u.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,d.jsx)(`div`,{className:`text-item-visible-container-default-content-primary-rest type-body`,children:o}),t[0]=o,t[1]=s),s},({token:e})=>{let{catalog:t,inviteLinks:n}=c(),{data:i,isPending:a,isError:o}=r(n.queries.activityInviteDetails.getActiveUserQuery().getOptions(e)),s=i===`revoked`,l=s?void 0:i,{data:u,isPending:d,isError:f}=r({...t.getBasicProductInfoQueryOptions(l?.titleId.toString()??``,`XboxTitleId`),enabled:l?.titleId!==void 0});return{inviteHost:l?.host.uniqueGamertag,isPending:a||d&&l?.titleId!==void 0,isError:o||f||s,gameTitle:u?.title}}),p=a(s(()=>{let{token:n}=e(t.share.gameInvite);if(!n)throw Error();return(0,d.jsx)(l,{location:`GameInvitePage`,children:(0,d.jsx)(f.useComponent(),{token:n})})},`GameInvitePage`));export{p as default};