import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import '../core/theme/app_colors.dart';

class BottomNavShell extends StatelessWidget {
  final StatefulNavigationShell navigationShell;

  const BottomNavShell({super.key, required this.navigationShell});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: navigationShell,
      bottomNavigationBar: Container(
        decoration: const BoxDecoration(
          border: Border(top: BorderSide(color: AppColors.border, width: 1)),
        ),
        child: BottomNavigationBar(
          currentIndex: navigationShell.currentIndex,
          onTap: (index) => navigationShell.goBranch(
            index,
            initialLocation: index == navigationShell.currentIndex,
          ),
          items: const [
            BottomNavigationBarItem(
              icon: Text('🏠', style: TextStyle(fontSize: 20)),
              activeIcon: Text('🏠', style: TextStyle(fontSize: 22)),
              label: 'Home',
            ),
            BottomNavigationBarItem(
              icon: Text('🤖', style: TextStyle(fontSize: 20)),
              activeIcon: Text('🤖', style: TextStyle(fontSize: 22)),
              label: 'Chat',
            ),
            BottomNavigationBarItem(
              icon: Text('🔮', style: TextStyle(fontSize: 20)),
              activeIcon: Text('🔮', style: TextStyle(fontSize: 22)),
              label: 'Akinator',
            ),
            BottomNavigationBarItem(
              icon: Text('📝', style: TextStyle(fontSize: 20)),
              activeIcon: Text('📝', style: TextStyle(fontSize: 22)),
              label: 'Quiz',
            ),
            BottomNavigationBarItem(
              icon: Text('☰', style: TextStyle(fontSize: 20)),
              activeIcon: Text('☰', style: TextStyle(fontSize: 22)),
              label: 'More',
            ),
          ],
        ),
      ),
    );
  }
}