import 'package:flutter_modular/flutter_modular.dart';
import 'package:krow_core/core.dart';

import 'data/repositories_impl/certificates_repository_impl.dart';
import 'domain/repositories/certificates_repository.dart';
import 'domain/usecases/get_certificates_usecase.dart';
import 'presentation/blocs/certificates/certificates_cubit.dart';
import 'presentation/pages/certificates_page.dart';

class StaffCertificatesModule extends Module {
  @override
  void binds(Injector i) {
    i.addLazySingleton<CertificatesRepository>(CertificatesRepositoryImpl.new);
    i.addLazySingleton(GetCertificatesUseCase.new);
    i.addLazySingleton(CertificatesCubit.new);
  }

  @override
  void routes(RouteManager r) {
    r.child(
      StaffPaths.childRoute(StaffPaths.certificates, StaffPaths.certificates),
      child: (_) => const CertificatesPage(),
    );
  }
}
