import { Badge } from '@/components/ui/badge' import { Button } from '@/components/ui/button' import { TableCell, TableRow } from '@/components/ui/table' import type { Playlist } from '@/lib/api/services/playlists' import { formatDuration } from '@/utils/format-duration' import { Calendar, Clock, Edit, Music, Play, User } from 'lucide-react' interface PlaylistRowProps { playlist: Playlist onEdit: (playlist: Playlist) => void onSetCurrent: (playlist: Playlist) => void } export function PlaylistRow({ playlist, onEdit, onSetCurrent }: PlaylistRowProps) { const formatDate = (dateString: string) => { return new Date(dateString).toLocaleDateString() } return (
{playlist.name}
{playlist.description && (
{playlist.description}
)}
{playlist.genre ? ( {playlist.genre} ) : ( - )} {playlist.user_name ? (
{playlist.user_name}
) : ( System )}
{playlist.sound_count}
{formatDuration(playlist.total_duration || 0)}
{formatDate(playlist.created_at)}
{playlist.is_current && Current} {playlist.is_main && Main} {!playlist.is_current && !playlist.is_main && ( - )}
{!playlist.is_current && ( )}
) }