import 'package:fcs/data/provider/delivery_address_data_provider.dart';
import 'package:fcs/domain/entities/connectivity.dart';
import 'package:fcs/domain/vo/delivery_address.dart';
import 'package:flutter/material.dart';

import 'delivery_address_service.dart';

class DeliveryAddressImp implements DeliveryAddressService {
  DeliveryAddressImp({
    @required this.connectivity,
    @required this.deliveryAddressDataProvider,
  });

  final Connectivity connectivity;
  final DeliveryAddressDataProvider deliveryAddressDataProvider;

  @override
  Future<void> createDeliveryAddress(DeliveryAddress deliveryAddress) {
    return deliveryAddressDataProvider.createDeliveryAddress(deliveryAddress);
  }

  @override
  Future<void> updateDeliveryAddress(DeliveryAddress deliveryAddress) {
    return deliveryAddressDataProvider.updateDeliveryAddress(deliveryAddress);
  }

  @override
  Future<void> deleteDeliveryAddress(DeliveryAddress deliveryAddress) {
    return deliveryAddressDataProvider.deleteDeliveryAddress(deliveryAddress);
  }

  @override
  Future<void> selectDefalutDeliveryAddress(DeliveryAddress deliveryAddress) {
    return deliveryAddressDataProvider
        .selectDefalutDeliveryAddress(deliveryAddress);
  }
}
