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]=`54a7c214-4f66-4e4f-8a86-9fa4d242c84e`,e._sentryDebugIdIdentifier=`sentry-dbid-54a7c214-4f66-4e4f-8a86-9fa4d242c84e`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{$m as t,Ag as n,Lm as r,Oi as i,Xt as a,Yi as o,Zt as s,_r as c,jg as l,ng as u,pi as d,ti as f}from"./entry.client-mpghtlrl.js";import{I as p}from"./xds-react-components-ihgca01z.js";import{n as m,t as h}from"./BenefitCard-c3ro2n67.js";var g=e(l(),1),_=n(),v=e(d(),1),y=(0,v.default)(`flex`,`min-h-dvh`,`flex-col`,`px-layout-horizontal-margin`),b=(0,v.default)(`flex`,`w-full`,`min-w-0`,`flex-col`,`gap-layout-vertical-new-section-tight`),x=(0,v.default)(`flex`,`flex-wrap`,`gap-internal-gap-regular`),S=(0,v.default)(`text-noninteractive-content-secondary-content`,`type-body`),C=u(),w=c(e=>{let t=(0,_.c)(19),{title:n,offers:r,isPending:i,isError:a,emptyMessage:o,errorMessage:s,onOfferSelected:c}=e,l;t[0]===n?l=t[1]:(l=(0,C.jsx)(p,{label1:n}),t[0]=n,t[1]=l);let u;t[2]!==a||t[3]!==s?(u=a&&(0,C.jsx)(`p`,{className:S,children:s}),t[2]=a,t[3]=s,t[4]=u):u=t[4];let d;t[5]!==a||t[6]!==i||t[7]!==r||t[8]!==o?(d=!a&&!i&&r.length===0&&(0,C.jsx)(`p`,{className:S,children:o}),t[5]=a,t[6]=i,t[7]=r,t[8]=o,t[9]=d):d=t[9];let m;t[10]!==a||t[11]!==c||t[12]!==r?(m=!a&&(0,C.jsx)(`div`,{className:x,children:r.map(e=>(0,C.jsx)(h,{summary:e,onSelect:c},e.offerId))}),t[10]=a,t[11]=c,t[12]=r,t[13]=m):m=t[13];let g;return t[14]!==l||t[15]!==u||t[16]!==d||t[17]!==m?(g=(0,C.jsxs)(f,{as:`main`,grid:!0,className:b,children:[l,u,d,m]}),t[14]=l,t[15]=u,t[16]=d,t[17]=m,t[18]=g):g=t[18],g},()=>{let{t:e}=t(`BenefitsHubPage`),{offers:n,isPending:r,isError:i}=m(),o=s({location:`BenefitsGalleryPageContent`}),c=(0,g.useCallback)(e=>{o({key:a.benefitsHub.fullPath,props:{offerId:e}},`BenefitCard`)},[o]);return{title:e(`In-game benefits`,{shortKey:`benefits_gallery_title`}),offers:n,isPending:r,isError:i,emptyMessage:e(`No benefits are available right now.`,{shortKey:`benefits_gallery_empty`}),errorMessage:e(`We couldn't load benefits right now.`,{shortKey:`benefits_gallery_error`}),onOfferSelected:c}}),T=()=>{let e=(0,_.c)(2),t=w.useComponent(),n;return e[0]===t?n=e[1]:(n=(0,C.jsx)(t,{}),e[0]=t,e[1]=n),n},E=c(()=>{let e=(0,_.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,C.jsx)(`div`,{className:y,children:(0,C.jsx)(T,{})}),e[0]=t):t=e[0],t},()=>({})),D=r(i(()=>{let e=(0,_.c)(2),t=E.useComponent(),n;return e[0]===t?n=e[1]:(n=(0,C.jsx)(t,{}),e[0]=t,e[1]=n),n},`BenefitsGalleryPage`));export{o as clientLoader,D as default};