import 'package:krow_data_connect/krow_data_connect.dart';
import 'package:krow_domain/krow_domain.dart';
import '../../domain/repositories/payments_repository.dart';

/// Implementation of [PaymentsRepository].
///
/// This class handles the retrieval of payment data by delegating to the
/// [FinancialRepositoryMock] from the data connect package.
///
/// It resides in the data layer and depends on the domain layer for the repository interface.
class PaymentsRepositoryImpl implements PaymentsRepository {
  final FinancialRepositoryMock financialRepository;

  /// Creates a [PaymentsRepositoryImpl] with the given [financialRepository].
  PaymentsRepositoryImpl({required this.financialRepository});

  @override
  Future<List<StaffPayment>> getPayments() async {
    // TODO: Get actual logged in staff ID
    return await financialRepository.getStaffPayments('staff_1');
  }
}
