library staff_time_card;

import 'package:flutter_modular/flutter_modular.dart';
import 'package:krow_data_connect/krow_data_connect.dart';

import 'data/repositories_impl/time_card_repository_impl.dart';
import 'domain/repositories/time_card_repository.dart';
import 'domain/usecases/get_time_cards_usecase.dart';
import 'presentation/blocs/time_card_bloc.dart';
import 'presentation/pages/time_card_page.dart';

export 'presentation/pages/time_card_page.dart';

class StaffTimeCardModule extends Module {
  @override
  void binds(Injector i) {
    // Repositories
    // In a real app, ShiftsRepository might be provided by a Core Data Module.
    // For this self-contained feature/mock, we instantiate it here if not available globally.
    // Assuming we need a local instance for the mock to work or it's stateless.
    i.add<ShiftsRepositoryMock>(ShiftsRepositoryMock.new);
    i.add<TimeCardRepository>(TimeCardRepositoryImpl.new);

    // UseCases
    i.add<GetTimeCardsUseCase>(GetTimeCardsUseCase.new);

    // Blocs
    i.add<TimeCardBloc>(TimeCardBloc.new);
  }

  @override
  void routes(RouteManager r) {
    r.child('/', child: (context) => const TimeCardPage());
  }
}
