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

/// Use case for fetching the current bill amount.
///
/// This use case encapsulates the logic for retrieving the total amount due for the current billing period.
/// It delegates the data retrieval to the [BillingRepository].
class GetCurrentBillAmountUseCase extends NoInputUseCase<double> {
  /// Creates a [GetCurrentBillAmountUseCase].
  GetCurrentBillAmountUseCase(this._repository);

  final BillingRepository _repository;

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