import 'package:flutter_modular/flutter_modular.dart';
import 'package:krow_data_connect/krow_data_connect.dart';
import 'data/repositories/availability_repository_impl.dart';
import 'domain/repositories/availability_repository.dart';
import 'domain/usecases/apply_quick_set_usecase.dart';
import 'domain/usecases/get_weekly_availability_usecase.dart';
import 'domain/usecases/update_day_availability_usecase.dart';
import 'presentation/blocs/availability_bloc.dart';
import 'presentation/pages/availability_page.dart';

class StaffAvailabilityModule extends Module {
  @override
  void binds(i) {
    // Data Sources
    i.add(StaffRepositoryMock.new);

    // Repository
    i.add<AvailabilityRepository>(AvailabilityRepositoryImpl.new);
    
    // UseCases
    i.add(GetWeeklyAvailabilityUseCase.new);
    i.add(UpdateDayAvailabilityUseCase.new);
    i.add(ApplyQuickSetUseCase.new);
    
    // BLoC
    i.add(AvailabilityBloc.new);
  }

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