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

import 'package:worker/core/theme/colors.dart';

/// Custom bottom navigation bar for the Worker app.
///
/// This widget will be fully implemented once navigation system is in place.
/// It will support 5 main tabs: Home, Products, Loyalty, Account, and More.
///
/// Example usage:
/// ```dart
/// CustomBottomNavBar(
///   currentIndex: _currentIndex,
///   onTap: (index) => _onNavigate(index),
/// )
/// ```
class CustomBottomNavBar extends StatelessWidget {
  /// Current selected tab index
  final int currentIndex;

  /// Callback when a tab is tapped
  final ValueChanged<int> onTap;

  /// Optional badge count for notifications
  final int? badgeCount;

  const CustomBottomNavBar({
    super.key,
    required this.currentIndex,
    required this.onTap,
    this.badgeCount,
  });

  @override
  Widget build(BuildContext context) {
    // Will be implemented with navigation
    // TODO: Implement full bottom navigation with:
    // - Home tab (home icon)
    // - Products tab (shopping_bag icon)
    // - Loyalty tab (card_membership icon)
    // - Account tab (person icon)
    // - More tab (menu icon) with notification badge
    //
    // Design specs:
    // - Height: 72px
    // - Icon size: 24px (selected: 28px)
    // - Label font size: 12px
    // - Selected color: primaryBlue
    // - Unselected color: grey500
    // - Badge: red circle with white text

    return BottomNavigationBar(
      currentIndex: currentIndex,
      onTap: onTap,
      type: BottomNavigationBarType.fixed,
      selectedItemColor: AppColors.primaryBlue,
      unselectedItemColor: AppColors.grey500,
      selectedFontSize: 12,
      unselectedFontSize: 12,
      items: const [
        BottomNavigationBarItem(icon: FaIcon(FontAwesomeIcons.house, size: 20), label: 'Home'),
        BottomNavigationBarItem(
          icon: FaIcon(FontAwesomeIcons.bagShopping, size: 20),
          label: 'Products',
        ),
        BottomNavigationBarItem(
          icon: FaIcon(FontAwesomeIcons.gift, size: 20),
          label: 'Loyalty',
        ),
        BottomNavigationBarItem(icon: FaIcon(FontAwesomeIcons.user, size: 20), label: 'Account'),
        BottomNavigationBarItem(icon: FaIcon(FontAwesomeIcons.bars, size: 20), label: 'More'),
      ],
    );
  }
}
