import { Disc, Music, ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { motion } from "motion/react"; import { Album } from "@/types"; interface AlbumSelectorProps { albums: Album[]; selectedAlbum: Album | null; onSelect: (album: Album) => void; } export function AlbumSelector({ albums, selectedAlbum, onSelect }: AlbumSelectorProps) { if (albums.length === 0) return null; return (
{albums.map((album, i) => ( onSelect(album)} className={cn( "group cursor-pointer flex flex-col gap-3 relative", selectedAlbum?.path === album.path ? "opacity-80" : "" )} >
{album.coverPath ? ( {album.name} ) : (
)}

{album.name}

{album.path.split('/').pop()}

))}
); }