import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import '../home/views/home_page_view.dart';
import 'route_constants.dart';

// Uncomment these when blocs are ready
// import '../login/blocs/login_bloc.dart';
// import '../home/blocs/home_bloc.dart';

class AppRouter {
  Route onGenerateRoute(RouteSettings settings) {
    switch (settings.name) {
      case '/':
      case RouteConstants.home:
        return MaterialPageRoute(
          builder: (_) {
            // return BlocProvider(create: (_) => HomeBloc(), child: const HomePage());
            return const HomePage();
          },
        );

      default:
        return MaterialPageRoute(
          builder: (_) => const Scaffold(
            body: Center(child: Text('404 - Page Not Found')),
          ),
        );
    }
  }
}
