import 'package:krow_core/core.dart';
import '../repositories/billing_repository.dart';

/// Use case for fetching the savings amount.
///
/// This use case encapsulates the logic for retrieving the estimated savings for the client.
/// It delegates the data retrieval to the [BillingRepository].
class GetSavingsAmountUseCase extends NoInputUseCase<double> {
  /// Creates a [GetSavingsAmountUseCase].
  GetSavingsAmountUseCase(this._repository);

  final BillingRepository _repository;

  @override
  Future<double> call() => _repository.getSavingsAmount();
}
