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

/// Implementation of [EmergencyContactRepositoryInterface].
///
/// This repository delegates data operations to the [ProfileRepositoryMock]
/// (or real implementation) from the `data_connect` package.
class EmergencyContactRepositoryImpl
    implements EmergencyContactRepositoryInterface {
  final ProfileRepositoryMock _profileRepository;

  /// Creates an [EmergencyContactRepositoryImpl].
  EmergencyContactRepositoryImpl(this._profileRepository);

  @override
  Future<List<EmergencyContact>> getContacts(String staffId) {
    return _profileRepository.getEmergencyContacts(staffId);
  }

  @override
  Future<void> saveContacts(String staffId, List<EmergencyContact> contacts) {
    return _profileRepository.saveEmergencyContacts(staffId, contacts);
  }
}
