import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';

class MainBottomNavbar extends StatelessWidget {
  final TabsRouter tabsRouter;
  const MainBottomNavbar({super.key, required this.tabsRouter});

  @override
  Widget build(BuildContext context) {
    return BottomNavigationBar(
      currentIndex: tabsRouter.activeIndex,
      onTap: (index) {
        tabsRouter.setActiveIndex(index);
      },
      items: const [
        BottomNavigationBarItem(
          icon: Icon(Icons.home),
          label: 'Home',
          tooltip: 'Home',
        ),
        BottomNavigationBarItem(
          icon: Icon(Icons.discount),
          label: 'Voucher',
          tooltip: 'Voucher',
        ),
        BottomNavigationBarItem(
          icon: Icon(Icons.list),
          label: 'Pesanan',
          tooltip: 'Pesanan',
        ),
        BottomNavigationBarItem(
          icon: Icon(Icons.person),
          label: 'Profil',
          tooltip: 'Profil',
        ),
      ],
    );
  }
}
