"use client"; import { motion } from "framer-motion"; import { Home, Cpu, CheckSquare, Settings } from "lucide-react"; interface Props { active: string; onChange: (tab: string) => void; } const TABS = [ { id: "home", label: "Главная", icon: Home }, { id: "devices", label: "Устройства", icon: Cpu }, { id: "tasks", label: "Задачи", icon: CheckSquare }, { id: "settings", label: "Настройки", icon: Settings }, ]; export default function BottomNav({ active, onChange }: Props) { return ( {TABS.map((tab) => { const Icon = tab.icon; const isActive = active === tab.id; return ( onChange(tab.id)} className="flex flex-col items-center gap-1 px-6 py-2 rounded-xl relative" whileTap={{ scale: 0.88 }} style={{ background: isActive ? "rgba(99,102,241,0.15)" : "transparent", }} > {isActive && ( )} {tab.label} ); })} ); }