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

/// Use case for updating staff profile information.
///
/// This use case updates the staff profile information
/// through the repository, which delegates to the data_connect layer.
class UpdatePersonalInfoUseCase
    implements UseCase<Staff, Staff> {
  final PersonalInfoRepositoryInterface _repository;

  /// Creates an [UpdatePersonalInfoUseCase].
  ///
  /// Requires a [PersonalInfoRepositoryInterface] to update data.
  UpdatePersonalInfoUseCase(this._repository);

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