"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[5070],{67273:(e,t,a)=>{a.r(t),a.d(t,{SKELETON_CARDS_COUNT:()=>w,default:()=>C});var n=a(84875),s=a.n(n),i=a(36844),o=a(3802),r=a(91703),c=a(23627),l=a(92348),d=a(33482),m=a(46617),g=a(29251),u=a(69527),h=a(36087),x=a(4637);const S=({section:e})=>(0,x.jsx)(u.q,{pageId:e.uri,title:e.data.title?.text??"",showAll:!0,index:0,id:e.uri,children:e.sectionItems.items.map(h.x)});var j=a(85013);const f=({section:e})=>{switch(e.data?.__typename){case"HomeGenericSectionData":return(0,x.jsx)(S,{section:(0,j.f)(e,e.data)});case"HomeShortsSectionData":case"HomeRecentlyPlayedSectionData":case"HomeFeedBaselineSectionData":case"HomeNativeAdsSectionData":case"HomeOnboardingSectionData":case null:case void 0:case"HomeFeatureActivationSectionData":case"HomeOnboardingSectionDataV2":case"HomeYourDJSectionData":return null;default:return(0,g._)(e.data),null}};var p=a(59496),v=a(9654),D=a(5945);const H=(0,p.memo)((({cardCount:e})=>(0,x.jsx)(D.X,{isLoading:!0,showAll:!0,children:[...new Array(e).keys()].map(((e,t)=>(0,x.jsx)(v.A,{isLoading:!0},t)))})));var _=a(11268),y=a(41836),b=a(4776);const w=10,A=({uri:e})=>{const{data:t,error:a,loading:n}=(0,m.xf)({uri:e,timeZone:(0,_.L7)()},{cacheTime:_.us,staleTime:_.fS});if(n)return(0,x.jsx)("section",{"data-testid":"home-page",children:(0,x.jsx)("div",{className:b.Z.home,children:(0,x.jsx)("div",{className:s()(b.Z.content,"contentSpacing"),children:(0,x.jsx)(H,{cardCount:w})})})});if(null!==a)return(0,x.jsx)(c.h,{hasError:!0,errorMessage:o.ag.get("error.generic")});const i=t?.homeSections;if("HomeSectionCollection"!==i?.__typename||0===i.sections.length)return(0,x.jsx)(c.h,{hasError:!0,errorMessage:o.ag.get("error.generic")});const r=i.sections[0];return"HomeSection"!==r.__typename?(0,x.jsx)(c.h,{hasError:!0,errorMessage:o.ag.get("error.generic")}):(0,x.jsx)("section",{"data-testid":"home-section-page",children:(0,x.jsx)("div",{className:b.Z.home,children:(0,x.jsx)("div",{className:s()(b.Z.content,"contentSpacing"),children:(0,x.jsx)(f,{section:r})})})})},C=({uri:e})=>{const t=(0,i.W6)(y.yg),a=(0,d.S)(t);return(0,x.jsxs)(l.q,{config:a,children:[(0,x.jsx)(r.$,{children:o.ag.get("page.generic-title")}),(0,x.jsx)(A,{uri:e})]})}}}]); //# sourceMappingURL=home-v2-section.js.map