import 'package:flutter/material.dart'; import '../utils/translations.dart'; class BottomNavBar extends StatelessWidget { final int selectedIndex; final Function(int) onItemTapped; final String selectedLanguage; const BottomNavBar({ super.key, required this.selectedIndex, required this.onItemTapped, required this.selectedLanguage, }); String _t(String key) { return AppTranslations.translate(key, selectedLanguage); } @override Widget build(BuildContext context) { return SafeArea( child: SizedBox( height: 80, child: BottomNavigationBar( backgroundColor: Colors.grey[900], currentIndex: selectedIndex, onTap: onItemTapped, showSelectedLabels: true, showUnselectedLabels: true, type: BottomNavigationBarType.fixed, selectedFontSize: 12, unselectedFontSize: 12, selectedItemColor: Colors.white, unselectedItemColor: Colors.white70, items: [ BottomNavigationBarItem(icon: const Icon(Icons.book), label: _t("Book")), BottomNavigationBarItem(icon: const Icon(Icons.my_location), label: _t("Shooting")), BottomNavigationBarItem(icon: const Icon(Icons.camera_alt), label: _t("Camera")), BottomNavigationBarItem(icon: const Icon(Icons.calendar_today), label: _t("Calendar")), BottomNavigationBarItem(icon: const Icon(Icons.settings), label: _t("Settings")), ], ), ), ); } }