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

/// Use case to retrieve payment summary information.
///
/// It fetches the full list of payments, which ideally should be aggregated
/// by the presentation layer or a specific data source method.
class GetPaymentSummaryUseCase extends NoInputUseCase<List<StaffPayment>> {
  final PaymentsRepository repository;

  /// Creates a [GetPaymentSummaryUseCase].
  GetPaymentSummaryUseCase(this.repository);

  @override
  Future<List<StaffPayment>> call() async {
    return await repository.getPayments();
  }
}
