import 'package:krow_domain/krow_domain.dart';
import '../models/billing_period.dart';

/// Repository interface for billing related operations.
///
/// This interface defines the contract for accessing billing-related data,
/// acting as a boundary between the Domain and Data layers.
/// It allows the Domain layer to remain independent of specific data sources.
abstract class BillingRepository {
  /// Fetches invoices that are pending approval or payment.
  Future<List<Invoice>> getPendingInvoices();

  /// Fetches historically paid invoices.
  Future<List<Invoice>> getInvoiceHistory();

  /// Fetches the current bill amount for the period.
  Future<double> getCurrentBillAmount();

  /// Fetches the savings amount.
  Future<double> getSavingsAmount();

  /// Fetches invoice items for spending breakdown analysis.
  Future<List<InvoiceItem>> getSpendingBreakdown(BillingPeriod period);
}
