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

import 'data/repositories_impl/attire_repository_impl.dart';
import 'domain/repositories/attire_repository.dart';
import 'domain/usecases/get_attire_options_usecase.dart';
import 'domain/usecases/save_attire_usecase.dart';
import 'domain/usecases/upload_attire_photo_usecase.dart';
import 'presentation/blocs/attire_cubit.dart';
import 'presentation/pages/attire_page.dart';

class StaffAttireModule extends Module {
  @override
  void binds(Injector i) {
    // Repository
    i.addLazySingleton<AttireRepository>(AttireRepositoryImpl.new);

    // Use Cases
    i.addLazySingleton(GetAttireOptionsUseCase.new);
    i.addLazySingleton(SaveAttireUseCase.new);
    i.addLazySingleton(UploadAttirePhotoUseCase.new);
    
    // BLoC
    i.addLazySingleton(AttireCubit.new);
  }

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