import 'package:injectable/injectable.dart';
import 'package:krow/core/data/models/staff/full_address_model.dart';
import 'package:krow/features/profile/address/data/address_api_provider.dart';
import 'package:krow/features/profile/address/data/address_repository.dart';

@Singleton(as: AddressRepository)
class AddressRepositoryImpl implements AddressRepository {
  final AddressApiProvider _apiProvider;

  AddressRepositoryImpl({required AddressApiProvider apiProvider})
      : _apiProvider = apiProvider;

  @override
  Stream<FullAddress?> getStaffAddress() {
    return _apiProvider.getStaffAddress();
  }

  @override
  Future<void> putAddress(FullAddress address) {
    return _apiProvider.putAddress(address);
  }
}
