"use strict";(this.__LOADABLE_LOADED_CHUNKS__=this.__LOADABLE_LOADED_CHUNKS__||[]).push([[48],{78205:(t,e,i)=>{i.r(e),i.d(e,{default:()=>X});var n=i(19981),l=i(9969),o=i(43422),s=i(59294),a=i(36012),r=i.n(a),d=i(74763),Z=i(87805),c=i(9821),h=i(24179),u=i(87779),p=i(10881),v=i(78257),m=i(15061),y=i(97216),b=i(61729),w=i(93740),S=i(33998),L=i(25025),g=i(61993),A=i(90758),R=i(96832),_=i(96092),f=i(66833),B=i(12024),D=i(83738),k=i(74135),C=i(24586),I=i(54067),T=i(32173),E=i(71130),O=i(34853),H=function(t){return t.Artist="artist",t.Favorite="favorites",t.Live="live",t}(H||{});const M=(0,u.Z)(c.Z);var N={name:"4bgdod",styles:"display:block;position:relative"};const X=function({getSavedStations:t,isSnapshot:e,removeSavedStation:i,savedStations:a}){const[c,u]=(0,R.useState)(0),[X,F]=(0,R.useState)(!0),[U,Y]=(0,R.useState)(!1),[j,G]=(0,R.useState)(!1),K=(0,E.useDispatch)(),x=(0,A.Z)(),P={dropdown:{[H.Artist]:x("Remove Artist"),[H.Live]:x("Remove station")},subtitle:{[H.Artist]:x("Artist Radio"),[H.Live]:x("Live Radio")}},q=(0,R.useCallback)(((t,e="")=>i(t).then((()=>K((0,C.j_)({icon:_.G.Deleted,title:x("{name} removed from Your Library",{name:e})}))))),[K,i,x]),z=(0,R.useCallback)((async e=>{Y(!0),await t({limit:30,offset:c},e),j||G(!0),u(c+30),Y(!1)}),[t,j,c]);(0,R.useEffect)((()=>{X&&a.length{z(!0)}));let J=[...(0,o.Z)({noRoundTiles:e})];J=a.map((t=>{const{id:e,name:i,imageUrl:n,seedType:o,url:s}=t,a=o===H.Artist,r=(0,B.iG)(o),Z=P.subtitle[o]||"",c=(0,O.tZ)(y.Z,{hiddenElement:(0,O.tZ)(l.Z,{alt:i,aspectRatio:1,background:!0,height:I.ul,id:e,src:n,type:o,width:I.ul}),shouldShow:r,children:(0,O.tZ)(p.Z,{alt:i,aspectRatio:1,src:n,width:I.ul})}),u=(0,O.tZ)(h.Z,{"data-test":"my-stations-play-button-container",children:(0,O.tZ)(M,{className:"play",deferPlay:!!s,seedId:e,stationId:e,stationType:o})}),m=(0,O.tZ)(w.Z,{children:(0,O.tZ)(k.v,{children:(0,O.tZ)(k.v.List,{children:(0,O.tZ)(k.v.Item,{children:(0,O.tZ)(f.j2,{onClick:()=>q(e,i),type:"button",children:P.dropdown[o]})})})})});return(0,O.BX)(R.Fragment,{children:[(0,O.tZ)(v.Z,{imageComponent:c,isRoundImage:a,playButtonComponent:u,subtitleComponent:Z,title:i,url:s}),(0,O.tZ)(b.Z,{dropdown:P.dropdown[o]?m:null,isRoundImage:a,noTileOnMobile:!0,subTitle:Z,tileDelay:0,tilesInRow:T.n,title:i,url:s,children:(0,O.BX)(d.Z,{css:N,to:s,children:[u,(0,O.tZ)(L.Z,{liveTile:o===H.Live,children:c})]})})]},e)}));const Q=j&&0===J.length;return(0,O.BX)(O.HY,{children:[(0,O.tZ)(f.H4,{"data-test":"your-library-user-stations-title",hideHeader:Q,hideInMobile:Q,children:(0,O.tZ)(m.Z,{children:x("Followed Stations")})}),(0,O.BX)(y.Z,{shouldShow:!Q,children:[(0,O.tZ)(n.Z,{}),(0,O.tZ)(f.Nx,{children:(0,O.tZ)(r(),{hasMore:X,loadMore:()=>{X&&!U&&j&&z(!1)},pageStart:0,children:(0,O.tZ)(S.Z,{noTileOnMobile:!0,tilesInRow:T.n,children:J})})})]}),(0,O.tZ)(y.Z,{shouldShow:Q,children:(0,O.tZ)(s.Z,{buttons:[(0,O.tZ)(d.Z,{to:"/live/",children:(0,O.tZ)(Z.Z,{children:x("Browse Live Radio")})},"live-empty-link"),(0,O.tZ)(d.Z,{dataTest:"artist-radio-empty-link",to:"/artist/",children:(0,O.tZ)(Z.Z,{children:x("Browse Artist Radio")})},"artist-empty-link")],icon:D.t0,subtitle:x("Need help finding stations to save?"),title:x("Your followed live and artist radio stations will show up here")})})]})}}}]); //# sourceMappingURL=SavedStations.www.js.map