'use client' export interface PlaylistHeaderProps { title: string description?: string coverUrl?: string ownerName: string isPublic: boolean songCount: number duration: number isOwner?: boolean onPlayAll?: () => void onEdit?: () => void onDelete?: () => void } export function PlaylistHeader({ title, description, coverUrl, ownerName, isPublic, songCount, duration, isOwner = false, onPlayAll, onEdit, onDelete }: PlaylistHeaderProps) { 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` } return (
{/* Cover Image */}
{coverUrl ? ( {title} ) : (
)} {/* Privacy Badge */} {!isPublic && (
Private
)}
{/* Playlist Info */}

Playlist

{title}

{description && (

{description}

)}
{ownerName} {songCount} {songCount === 1 ? 'song' : 'songs'} {duration > 0 && ( <> {formatDuration(duration)} )}
{/* Actions */}
{onPlayAll && ( )} {isOwner && ( <> {onEdit && ( )} {onDelete && ( )} )}
) }