import{j as e}from"./ui-vendor-CmkjIuKR.js";import{r as n}from"./react-vendor-Dv0pxvir.js";import{u,L as m,P as x,S as p,T as g}from"./index-BXuoNcqN.js";function h(){const{playlists:s,loading:r}=u(8),[t,a]=n.useState(null),[l,i]=n.useState(null);return r?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(m,{className:"w-8 h-8 text-green-500 animate-spin"})}):!r&&s.length===0?e.jsx("div",{className:"text-center py-12",children:e.jsx("p",{className:"text-gray-500 text-lg",children:"No featured playlists available at the moment."})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:s.map(o=>e.jsx(x,{playlist:o,onSubmit:c=>a(s.find(d=>d.id===c)||null),priority:!0,showFeaturedBadge:!0},o.id))}),t&&e.jsx(p,{playlist:t,onClose:()=>a(null),onSubmit:()=>{a(null),i({type:"success",message:`Track submitted to ${t.name}! Watch your inbox for feedback from the curator.`})}}),l&&e.jsx(g,{message:l.message,type:l.type,onClose:()=>i(null)})]})}export{h as FeaturedPlaylists};
//# sourceMappingURL=FeaturedPlaylists-DEzUyKnr.js.map