'use client'; import React, { useState } from 'react'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { Home, Search, ShoppingBag, MessageCircle, User, Shield } from 'lucide-react'; import { useBrand } from '@/context/BrandContext'; import { useAuth } from '@/context/AuthContext'; interface MobileBottomDockProps { cartCount: number; onOpenCart: () => void; onOpenSearch?: () => void; onOpenInstallModal?: () => void; } export const MobileBottomDock: React.FC = ({ cartCount, onOpenCart, onOpenSearch, }) => { const { currentBrand } = useBrand(); const { user, openAuthModal } = useAuth(); const pathname = usePathname(); const [activeTab, setActiveTab] = useState('home'); const handleWhatsApp = () => { const text = encodeURIComponent( `Hola ${currentBrand.name}! 👋 Quiero consultar la disponibilidad de unas zapatillas para despacho contraentrega en 24 horas.` ); window.open(`https://wa.me/${currentBrand.whatsappNumber}?text=${text}`, '_blank'); }; const isAdmin = Boolean(user && (user.role === 'admin' || user.role === 'operator')); const isAdminActive = pathname?.startsWith('/admin'); const isHomeActive = pathname === '/' && activeTab === 'home'; return ( ); };