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]=`329a65a0-2516-499b-9499-4d16e9781f2d`,e._sentryDebugIdIdentifier=`sentry-dbid-329a65a0-2516-499b-9499-4d16e9781f2d`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{$m as t,Ag as n,Fr as r,Zh as i,Zm as a,_r as o,hi as s,ng as c,pi as l}from"./entry.client-mpghtlrl.js";import{ft as u}from"./xds-react-components-ihgca01z.js";import{Dt as d}from"./workspace-leaf-files-oergw4h0.js";import{s as f}from"./FriendsWhoPlay-le9mdzt6.js";import{n as p}from"./DialogShell-ga7ic6wy.js";import{t as m}from"./GameSessionDetails-lrb45wq3.js";var h=n(),g=e(l(),1),_=c(),v=o(({profileInJoinableGame:e,productInfo:n,session:r})=>{let{t:i}=t(`JoinGameDialog`);return(0,_.jsx)(m.useComponent(),{productInfo:n,title:i(`Join {gamertag} in`,{values:{gamertag:e.gamertag.base},shortKey:`join_in_2c3d1b`}),session:{kind:`join`,host:e,payload:JSON.stringify(r?.rawActivity||{}),titleId:f(n)??void 0}})},({profileInJoinableGame:e})=>{let{catalog:t,friends:n}=a(),{data:r}=i(t.queries.productInfo.detailed.getOptions({productId:e.productId})),{data:o}=i(n.queries.joinableSessionFromXuid.getActiveUserQuery().getOptions({xuid:e.xuid,xboxTitleId:r.XboxTitleId??``}));return{profileInJoinableGame:e,productInfo:r,session:o}}),y=e=>{let t=(0,h.c)(15),{profileInJoinableGame:n}=e,i=p.useComponent(),a=v.useComponent(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={edge:`bottom`,centered:!0},t[0]=o):o=t[0];let c=u(o),l;t[1]===c?l=t[2]:(l=r(c),t[1]=c,t[2]=l);let f=l,m;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(m={default:!0,SM_20:!1},t[3]=m):m=t[3];let{data:y}=s(m),b=y?f:void 0,x=!y,S;t[4]!==x||t[5]!==y?(S=(0,g.default)(d,{"modal-floating":x,"modal-docked":y}),t[4]=x,t[5]=y,t[6]=S):S=t[6];let C;t[7]!==a||t[8]!==n?(C=(0,_.jsx)(a,{profileInJoinableGame:n}),t[7]=a,t[8]=n,t[9]=C):C=t[9];let w;return t[10]!==i||t[11]!==S||t[12]!==b||t[13]!==C?(w=(0,_.jsx)(i,{className:S,positionStyle:b,children:C}),t[10]=i,t[11]=S,t[12]=b,t[13]=C,t[14]=w):w=t[14],w};export{y as JoinGameDialog,y as default};