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

/// Use case for retrieving staff profile information.
///
/// This use case fetches the complete staff profile from the repository,
/// which delegates to the data_connect layer for data access.
class GetPersonalInfoUseCase
    implements NoInputUseCase<Staff> {
  final PersonalInfoRepositoryInterface _repository;

  /// Creates a [GetPersonalInfoUseCase].
  ///
  /// Requires a [PersonalInfoRepositoryInterface] to fetch data.
  GetPersonalInfoUseCase(this._repository);

  @override
  Future<Staff> call() {
    return _repository.getStaffProfile();
  }
}
