'use client' export interface AlbumHeaderProps { title: string artistName: string artistId: string coverUrl?: string releaseDate: string trackCount: number duration: number type?: 'album' | 'single' | 'ep' onPlayAll?: () => void onArtistClick?: () => void } export function AlbumHeader({ title, artistName, artistId, coverUrl, releaseDate, trackCount, duration, type = 'album', onPlayAll, onArtistClick }: AlbumHeaderProps) { const formatDuration = (seconds: number) => { const hours = Math.floor(seconds / 3600) const minutes = Math.floor((seconds % 3600) / 60) if (hours > 0) return `${hours} hr ${minutes} min` return `${minutes} min` } const formatDate = (dateString: string) => { const date = new Date(dateString) return date.toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' }) } return (
{/* Cover Image */}
{coverUrl ? ( {title} ) : (
)}
{/* Album Info */}

{type}

{title}

{formatDate(releaseDate)} {trackCount} {trackCount === 1 ? 'song' : 'songs'} {formatDuration(duration)}
{/* Play Button */} {onPlayAll && ( )}
) }