import 'package:krow_core/core.dart';
import 'package:krow_domain/krow_domain.dart';
import '../repositories/home_repository_interface.dart';

/// Use case to fetch recent completed shift roles for reorder suggestions.
class GetRecentReordersUseCase implements NoInputUseCase<List<ReorderItem>> {

  /// Creates a [GetRecentReordersUseCase].
  GetRecentReordersUseCase(this._repository);
  final HomeRepositoryInterface _repository;

  @override
  Future<List<ReorderItem>> call() {
    return _repository.getRecentReorders();
  }
}
