import { Ionicons } from '@expo/vector-icons'; import { useRouter } from 'expo-router'; import { Pressable, View, Text } from 'react-native'; import { useTheme } from '~/utils/themeContext'; import { useAudio } from '~/contexts/AudioContext'; import { usePlayerStore } from '~/stores/playerStore'; import { Artwork } from './Artwork'; export function MiniPlayer() { const { colors } = useTheme(); const router = useRouter(); const { play, pause, playNext } = useAudio(); const currentSong = usePlayerStore((s) => s.currentSong); const isPlaying = usePlayerStore((s) => s.isPlaying); const position = usePlayerStore((s) => s.position); const duration = usePlayerStore((s) => s.duration); if (!currentSong) return null; const progress = duration > 0 ? position / duration : 0; return ( router.push('/player')} style={{ position: 'absolute', bottom: 49, left: 0, right: 0, backgroundColor: colors.card, borderTopWidth: 0.5, borderTopColor: colors.border, }} > {/* Progress indicator */} {currentSong.title} {currentSong.artist || 'Unbekannt'} ); }