import{j as s}from"./ui-vendor-C3vDQktR.js";import{r as n}from"./react-vendor-DqtKxO-G.js";import{u as d,L as u,P as x,S as p,T as g}from"./index-BaFeowp1.js";function h(){const{playlists:e,loading:r}=d(8),[t,a]=n.useState(null),[l,i]=n.useState(null);return r?s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx(u,{className:"w-8 h-8 text-green-500 animate-spin"})}):!r&&e.length===0?s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-gray-500 text-lg",children:"No featured playlists available at the moment."})}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:e.map(o=>s.jsx(x,{playlist:o,onSubmit:c=>a(e.find(m=>m.id===c)||null),priority:!0},o.id))}),t&&s.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&&s.jsx(g,{message:l.message,type:l.type,onClose:()=>i(null)})]})}export{h as FeaturedPlaylists}; //# sourceMappingURL=FeaturedPlaylists-CGac0gns.js.map