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]=`b7bd5b39-fe0b-4ee3-b7f8-44f07697d272`,e._sentryDebugIdIdentifier=`sentry-dbid-b7bd5b39-fe0b-4ee3-b7f8-44f07697d272`)}catch{}import"./rolldown-runtime-eb2nym32.js";import{Ag as e,Dg as t,Fg as n,Qn as r,dn as i,eh as a,mr as o,sh as s}from"./entry.client-dr7r6s9a.js";import{l as c,u as l}from"./GameTileError-n5mrzlkv.js";import{t as u}from"./GameTileLoading-nieaaofo.js";import{t as d}from"./ContainerVirtualGrid-db88vdpo.js";import{t as f}from"./GuidePageLayout-imh16gdu.js";import{t as p}from"./GuideIllustration-ox8r1eop.js";import{t as m}from"./GuideL2Header-b90pi17a.js";import{t as h}from"./useJumpStrings-kzg010sg.js";import{n as g,t as _}from"./useRecentsTileHandlers-on4lue0a.js";var v=n(),y=e(),b=()=>{let e=(0,v.c)(7),{locEmptyRecentsTitle:t,locEmptyRecentsSubtitle:n}=h(),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,y.jsx)(p,{title:r,subtitle:i,illustrationType:`playVideo`}),e[4]=r,e[5]=i,e[6]=a):a=e[6],a},x=()=>{let e=(0,v.c)(7),{locSomethingWentWrong:t,locGenericErrorSubheading:n}=a(),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 o;return e[4]!==r||e[5]!==i?(o=(0,y.jsx)(p,{title:r,subtitle:i,illustrationType:`error`}),e[4]=r,e[5]=i,e[6]=o):o=e[6],o},S=4,C=()=>{let e=(0,v.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,y.jsx)(r,{className:`gap-layout-vertical-group-of-items-regular`,children:Array.from({length:S},w)}),e[0]=t):t=e[0],t};function w(e,t){return(0,y.jsx)(u,{cardType:`tile`,direction:`horizontal`},t)}var T=20,E=i(e=>{let t=(0,v.c)(10),{productIds:n,areTitlesLoading:r,areTitlesError:i,onGameTilePress:a}=e;if(i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,y.jsx)(x,{}),t[0]=e):e=t[0],e}else if(r){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,y.jsx)(C,{}),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,y.jsx)(b,{}),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,y.jsx)(g,{productId:e,cardType:`tile`,direction:`horizontal`,trialTimeDisplay:`startedOnly`,background:`invisible`,growOnHover:!1,enableContextMenu:!0,className:c,imageClassName:l,onPress:(e,t)=>a(e,t)},e),t[5]=a,t[6]=r);let i;return t[7]!==e||t[8]!==r?(i=(0,y.jsx)(d,{items:e,renderItem:r,columns:1,overscan:5,gapSize:`24px`}),t[7]=e,t[8]=r,t[9]=i):i=t[9],i}},()=>{let{title:e}=s(),{data:n,isLoading:r,isError:i}=t(e.queries.userTitleHistoryProductIds.getActiveUserQuery().getOptions()),a=n?.slice(0,T)||[],{handlePress:o}=_();return{productIds:a,areTitlesLoading:r,areTitlesError:i,onGameTilePress:o}}),D=()=>{let e=(0,v.c)(2),t=E.useComponent(),n;return e[0]===t?n=e[1]:(n=(0,y.jsx)(t,{}),e[0]=t,e[1]=n),n},O=o(()=>{let{locRecentlyPlayed:e}=h();return(0,y.jsx)(f,{id:`guide-recents-page`,header:(0,y.jsx)(m,{title:e()}),contentClassName:`gap-layout-vertical-related-content-in-a-section-tight`,children:(0,y.jsx)(D,{})})},`RecentsPage`);export{O as RecentsPage,O as default};