import 'package:krow_core/core.dart';
import 'package:krow_domain/krow_domain.dart';
import '../repositories/clock_in_repository_interface.dart';
import '../arguments/clock_in_arguments.dart';

/// Use case for clocking in a user.
class ClockInUseCase implements UseCase<ClockInArguments, AttendanceStatus> {
  final ClockInRepositoryInterface _repository;

  ClockInUseCase(this._repository);

  @override
  Future<AttendanceStatus> call(ClockInArguments arguments) {
    return _repository.clockIn(
      shiftId: arguments.shiftId,
      notes: arguments.notes,
    );
  }
}
