import React from 'react' import { View, Text, TouchableOpacity } from 'react-native' import { useRouter, usePathname } from 'expo-router' const NAV_ITEMS = [ { id: 'index', label: 'Home', icon: '🏠', route: '/' }, { id: 'playlist', label: 'Playlist', icon: '📀', route: '/playlist' }, { id: 'search', label: 'Search', icon: '🔍', route: '/search' }, { id: 'radio', label: 'Radio', icon: '📻', route: '/radio' }, { id: 'create', label: 'Create', icon: '➕', route: '/create' }, ] export function BottomNavBar() { const router = useRouter() const pathname = usePathname() return ( {NAV_ITEMS.map((item) => { const isActive = pathname === item.route || (item.route !== '/' && pathname.startsWith(item.route)) return ( router.push(item.route as any)} className="flex-1 items-center py-2" > {item.icon} {item.label} ) })} ) }