"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[124],{58242:(e,t,l)=>{l.r(t),l.d(t,{Folder:()=>x,default:()=>L});var r=l(67294),n=l.n(r),a=l(65858),i=l(52883),s=l(69518),c=l.n(s),m=l(20657),d=l(46309),o=l(30947),u=l(55911),g=l(63926),E=l(42922),f=l(84242),p=l(99013),b=l(9659),y=l(1663),v=l(70369),h=l(19565),k=l(42273),U=l(59482),w=l(72907),I=l(55120);const P="L2ObJLgRK8HSetL_xvYJ",x=e=>{const{id:t}=e,l=(0,a.v9)((({session:e})=>{var t;return null==e||null===(t=e.user)||void 0===t?void 0:t.id}))||null,i=c().folderURI(l,t).toURI(),s=(0,p.C)({folderUri:i,decorateImagesAndOwner:!0}),x=(0,a.v9)((e=>e.platform.isDesktop)),{isPlaying:L,togglePlay:C}=(0,f.n)({uri:i},{featureIdentifier:"folder"}),N=(0,r.useMemo)((()=>{const e=t=>t.items.reduce(((t,l)=>(0,b.lU)(l)?t.concat(e(l)):((0,b.no)(l)&&t.push(l),t)),[]);return s?e(s):[]}),[s]),F=N.length>0;return s?n().createElement("section",{className:P},n().createElement(v.$,null,m.ag.get("playlist.page-title",s.name)),n().createElement(k.gF,null,n().createElement(U.W,null,n().createElement(w.i,{text:s.name,dragUri:i,dragLabel:s.name})),n().createElement(k.sP,null,n().createElement(k.dy,{small:!0,uppercase:!0},m.ag.get("folder.title")),n().createElement(k.xd,{dragUri:i,dragLabel:s.name},s.name))),n().createElement(o.o,null,n().createElement(o.F,null,x&&n().createElement(I.$,{onClick:()=>C(),isPlaying:L,size:u.qE.lg,disabled:!F,uri:s.uri}))),n().createElement("div",{className:"contentSpacing"},F?n().createElement(E.ZP,{value:"EntitiesGrid"},n().createElement(g.T,{render:()=>N.map(((e,t)=>n().createElement(E.ZP,{key:e.uri,value:"card",index:t},n().createElement(d.Z,{index:t,name:e.name,uri:e.uri,images:e.images,description:e.description,authorName:e.owner.displayName}))))})):n().createElement(h.u,{title:m.ag.get("folder.empty.title"),message:m.ag.get("folder.empty.subtitle"),renderInline:!0}))):n().createElement(y.h,{hasError:!1,errorMessage:m.ag.get("error.generic")})},L=n().memo((()=>{const{folderId:e}=(0,i.UO)();return n().createElement(x,{id:e})}))}}]);
//# sourceMappingURL=xpui-routes-folder.js.map