import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter_modular/flutter_modular.dart';
import 'package:krow_data_connect/krow_data_connect.dart';
import 'data/repositories_impl/documents_repository_impl.dart';
import 'domain/repositories/documents_repository.dart';
import 'domain/usecases/get_documents_usecase.dart';
import 'presentation/blocs/documents/documents_cubit.dart';
import 'presentation/pages/documents_page.dart';

class StaffDocumentsModule extends Module {
  @override
  void binds(Injector i) {
    i.addLazySingleton<DocumentsRepository>(
      () => DocumentsRepositoryImpl(
        dataConnect: ExampleConnector.instance,
        firebaseAuth: FirebaseAuth.instance,
      ),
    );
    i.addLazySingleton(GetDocumentsUseCase.new);
    i.addLazySingleton(DocumentsCubit.new);
  }

  @override
  void routes(RouteManager r) {
    r.child('/', child: (_) => DocumentsPage());
  }
}
