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]=`b9943e96-c818-4660-bfb6-b42bc3cb40a2`,e._sentryDebugIdIdentifier=`sentry-dbid-b9943e96-c818-4660-bfb6-b42bc3cb40a2`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{rt as t}from"./xds-react-components-lks62tbl.js";import{Ag as n,Dn as r,Eg as i,Fg as a,cr as o,dn as s,lh as c,or as l,sh as u}from"./entry.client-dr7r6s9a.js";import{Ct as d}from"./workspace-leaf-files-mc5sghv7.js";import{r as f}from"./FriendsWhoPlay-c25cmbom.js";import{n as p}from"./DialogShell-k2jpaw9r.js";import{t as m}from"./GameSessionDetails-ecycyzpq.js";var h=a(),g=e(l(),1),_=n(),v=s(({profileInJoinableGame:e,productInfo:t,session:n})=>{let{t:r}=c(`JoinGameDialog`);return(0,_.jsx)(m.useComponent(),{productInfo:t,title:r(`Join {gamertag} in`,{values:{gamertag:e.gamertag.base},shortKey:`join_in_2c3d1b`}),session:{kind:`join`,host:e,payload:JSON.stringify(n?.rawActivity||{}),titleId:f(t)??void 0}})},({profileInJoinableGame:e})=>{let{catalog:t,friends:n}=u(),{data:r}=i(t.queries.productInfo.detailed.getOptions({productId:e.productId})),{data:a}=i(n.queries.joinableSessionFromXuid.getActiveUserQuery().getOptions({xuid:e.xuid,xboxTitleId:r.XboxTitleId??``}));return{profileInJoinableGame:e,productInfo:r,session:a}}),y=e=>{let n=(0,h.c)(15),{profileInJoinableGame:i}=e,a=p.useComponent(),s=v.useComponent(),c;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={edge:`bottom`,centered:!0},n[0]=c):c=n[0];let l=t(c),u;n[1]===l?u=n[2]:(u=r(l),n[1]=l,n[2]=u);let f=u,m;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(m={default:!0,SM_20:!1},n[3]=m):m=n[3];let{data:y}=o(m),b=y?f:void 0,x=!y,S;n[4]!==x||n[5]!==y?(S=(0,g.default)(d,{"modal-floating":x,"modal-docked":y}),n[4]=x,n[5]=y,n[6]=S):S=n[6];let C;n[7]!==s||n[8]!==i?(C=(0,_.jsx)(s,{profileInJoinableGame:i}),n[7]=s,n[8]=i,n[9]=C):C=n[9];let w;return n[10]!==a||n[11]!==S||n[12]!==b||n[13]!==C?(w=(0,_.jsx)(a,{className:S,positionStyle:b,children:C}),n[10]=a,n[11]=S,n[12]=b,n[13]=C,n[14]=w):w=n[14],w};export{y as JoinGameDialog,y as default};