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

import '../repositories/profile_repository.dart';

/// Use case for fetching a staff member's extended profile information.
///
/// This use case:
/// 1. Fetches the [Staff] object from the repository
/// 2. Returns it directly to the presentation layer
///
class GetProfileUseCase implements UseCase<void, Staff> {
  final ProfileRepositoryInterface _repository;

  /// Creates a [GetProfileUseCase].
  ///
  /// Requires a [ProfileRepositoryInterface] to interact with the profile data source.
  const GetProfileUseCase(this._repository);

  @override
  Future<Staff> call([void params]) async {
    // Fetch staff object from repository and return directly
    return await _repository.getStaffProfile();
  }
}
