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

/// Use case for clocking out a user.
class ClockOutUseCase implements UseCase<ClockOutArguments, AttendanceStatus> {
  final ClockInRepositoryInterface _repository;

  ClockOutUseCase(this._repository);

  @override
  Future<AttendanceStatus> call(ClockOutArguments arguments) {
    return _repository.clockOut(
      notes: arguments.notes,
      breakTimeMinutes: arguments.breakTimeMinutes,
    );
  }
}
