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]=`3e7582a5-478d-40cb-8368-1070f1b679a3`,e._sentryDebugIdIdentifier=`sentry-dbid-3e7582a5-478d-40cb-8368-1070f1b679a3`)}catch{}import{Ag as e,Hm as t,Qh as n,Zm as r,_r as i,ai as a,ng as o}from"./entry.client-mpghtlrl.js";import{a as s,i as c}from"./accelerators-mediz1dj.js";import{i as l}from"./game-tile-gvlusypf.js";import{t as u}from"./ContainerVirtualGrid-gc40b5uu.js";import{t as d}from"./GuideIllustration-pex5y7xc.js";import{t as f}from"./useJumpStrings-d9pk8ps8.js";import{r as p,t as m}from"./useRecentsTileHandlers-bcx1swum.js";var h=e(),g=o(),_=()=>{let e=(0,h.c)(7),{locEmptyRecentsTitle:t,locEmptyRecentsSubtitle:n}=f(),r;e[0]===t?r=e[1]:(r=t(),e[0]=t,e[1]=r);let i;e[2]===n?i=e[3]:(i=n(),e[2]=n,e[3]=i);let a;return e[4]!==r||e[5]!==i?(a=(0,g.jsx)(d,{title:r,subtitle:i,illustrationType:`playVideo`}),e[4]=r,e[5]=i,e[6]=a):a=e[6],a},v=()=>{let e=(0,h.c)(7),{locSomethingWentWrong:n,locGenericErrorSubheading:r}=t(),i;e[0]===n?i=e[1]:(i=n(),e[0]=n,e[1]=i);let a;e[2]===r?a=e[3]:(a=r(),e[2]=r,e[3]=a);let o;return e[4]!==i||e[5]!==a?(o=(0,g.jsx)(d,{title:i,subtitle:a,illustrationType:`error`}),e[4]=i,e[5]=a,e[6]=o):o=e[6],o},y=4,b=()=>{let e=(0,h.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,g.jsx)(a,{className:`gap-layout-vertical-group-of-items-regular`,children:Array.from({length:y},x)}),e[0]=t):t=e[0],t};function x(e,t){return(0,g.jsx)(l,{cardType:`tile`,direction:`horizontal`},t)}var S=20,C=()=>{},w=e=>{let t=(0,h.c)(12),{productIds:n,areTitlesLoading:r,areTitlesError:i,onGameTilePress:a,onEnter:o,onExit:s}=e;if(i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,g.jsx)(v,{}),t[0]=e):e=t[0],e}else if(r){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,g.jsx)(b,{}),t[1]=e):e=t[1],e}else if(n?.length===0){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,g.jsx)(_,{}),t[2]=e):e=t[2],e}else{let e;t[3]===n?e=t[4]:(e=n??[],t[3]=n,t[4]=e);let r;t[5]===a?r=t[6]:(r=e=>(0,g.jsx)(p,{productId:e,cardType:`tile`,direction:`horizontal`,trialTimeDisplay:`startedOnly`,background:`invisible`,growOnHover:!1,enableContextMenu:!0,onPress:(e,t)=>a(e,t)},e),t[5]=a,t[6]=r);let i;return t[7]!==e||t[8]!==r||t[9]!==o||t[10]!==s?(i=(0,g.jsx)(u,{"data-auto-focus":!0,items:e,renderItem:r,columns:1,overscan:5,gapSize:`var(--V235)`,onEnter:o,onExit:s}),t[7]=e,t[8]=r,t[9]=o,t[10]=s,t[11]=i):i=t[11],i}},T=i(w,()=>{let{title:e,adaptor:{native:{bridge:t}},library:i}=r(),{data:a,isLoading:o,isError:l}=n(e.queries.userTitleHistoryProductIds.getActiveUserQuery().getOptions()),{data:u}=n(t.queries.isSupported.getOptions()),{data:d}=n(i.queries.isGameTileContextMenuEnabled.getOptions()),f=a?.slice(0,S)||[],{handlePress:p}=m(),{onEnter:h,onExit:g}=s(c(`gamepad-context-menu`,C),!!u&&!!d);return{productIds:f,areTitlesLoading:o,areTitlesError:l,onGameTilePress:p,onEnter:h,onExit:g}}),E=()=>{let e=(0,h.c)(2),t=T.useComponent(),n;return e[0]===t?n=e[1]:(n=(0,g.jsx)(t,{}),e[0]=t,e[1]=n),n};export{E as n,w as t};