import { Link, useLocation } from 'react-router'; import { useTranslation } from 'react-i18next'; import { motion } from 'framer-motion'; import { cn } from '@/lib/utils'; import { usePlatform } from '@/platform'; // Icons import { HomeIcon, SubscriptionIcon, WalletIcon, UsersIcon, ChatIcon, WheelIcon } from './icons'; interface MobileBottomNavProps { isKeyboardOpen: boolean; referralEnabled?: boolean; wheelEnabled?: boolean; } export function MobileBottomNav({ isKeyboardOpen, referralEnabled, wheelEnabled, }: MobileBottomNavProps) { const { t } = useTranslation(); const location = useLocation(); const { haptic } = usePlatform(); const isActive = (path: string) => location.pathname === path; // Core navigation items for bottom bar // When wheel is enabled, it replaces Support in the bottom nav (Support is still accessible via hamburger menu) const coreItems = [ { path: '/', label: t('nav.dashboard'), icon: HomeIcon }, { path: '/subscriptions', label: t('nav.subscription'), icon: SubscriptionIcon }, { path: '/balance', label: t('nav.balance'), icon: WalletIcon }, ...(referralEnabled ? [{ path: '/referral', label: t('nav.referral'), icon: UsersIcon }] : []), ...(wheelEnabled ? [{ path: '/wheel', label: t('nav.wheel'), icon: WheelIcon }] : [{ path: '/support', label: t('nav.support'), icon: ChatIcon }]), ]; const handleNavClick = () => { haptic.impact('light'); }; return ( ); }