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

/// Use case for fetching staff compliance certificates.
///
/// Delegates the data retrieval to the [CertificatesRepository].
/// Follows the strict one-to-one mapping between action and use case.
class GetCertificatesUseCase extends NoInputUseCase<List<StaffDocument>> {
  final CertificatesRepository _repository;

  /// Creates a [GetCertificatesUseCase].
  ///
  /// Requires a [CertificatesRepository] to access the certificates data source.
  GetCertificatesUseCase(this._repository);

  @override
  Future<List<StaffDocument>> call() {
    return _repository.getCertificates();
  }
}
