import { View, Text, Pressable } from 'react-native'; import { Track } from '../lib/api'; import { Colors, Spacing, Typography } from '../constants/theme'; interface TrackCardProps { track: Track; isPlaying: boolean; onPlay: () => void; onPress: () => void; } export default function TrackCard({ track, isPlaying, onPlay, onPress }: TrackCardProps) { const durationStr = track.duration ? `${Math.floor(track.duration / 60)}:${String(track.duration % 60).padStart(2, '0')}` : null; return ( {/* Play button */} {isPlaying ? '⏸' : '▶'} {/* Track info */} {track.title} {track.artist} {track.album ? ` · ${track.album}` : ''} {/* Meta */} {track.isAi && ( AI )} {durationStr && ( {durationStr} )} ); }