import { Play, Pause, Shuffle, Download, Radio } from "lucide-react"; import { cn } from "@/utils/cn"; import type { Artist } from "../types"; import type { Album } from "../types"; import type { ArtistSource } from "../types"; const LIDIFY_YELLOW = "#ecb200"; interface ArtistActionBarProps { artist: Artist; albums: Album[]; source: ArtistSource; colors: any; onPlayAll: () => void; onShuffle: () => void; onDownloadAll: () => void; onStartRadio?: () => void; isPendingDownload: boolean; isPlaying?: boolean; isPlayingThisArtist?: boolean; onPause?: () => void; } export function ArtistActionBar({ artist, albums, source, colors, onPlayAll, onShuffle, onDownloadAll, onStartRadio, isPendingDownload, isPlaying = false, isPlayingThisArtist = false, onPause, }: ArtistActionBarProps) { const availableAlbums = albums.filter( (album) => album.availability !== "unavailable" ); const showDownloadAll = source === "discovery" || availableAlbums.length > 0; const showPause = isPlaying && isPlayingThisArtist; const showRadio = source === "library" && onStartRadio; const handlePlayPauseClick = () => { if (showPause && onPause) { onPause(); } else { onPlayAll(); } }; return (