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

import 'package_service.dart';

class PackageServiceImp implements PackageService {
  PackageServiceImp({
    @required this.connectivity,
    @required this.packageDataProvider,
  });

  final Connectivity connectivity;
  final PackageDataProvider packageDataProvider;

  @override
  Future<void> createPackages(List<Package> packages, String fcsID) {
    return packageDataProvider.createPackages(packages, fcsID);
  }

  @override
  Future<void> createReceiving(Package package) {
    return packageDataProvider.createReceiving(package);
  }

  @override
  Future<void> updateReceiving(Package package) {
    return packageDataProvider.updateReceiving(package);
  }

  @override
  Future<List<Package>> searchPackage(String term) {
    return packageDataProvider.searchPackage(term);
  }

  @override
  Future<void> deleteReceiving(Package package) {
    return packageDataProvider.deleteReceiving(package);
  }

  @override
  Future<void> updateProcessing(Package package) {
    return packageDataProvider.updateProcessing(package);
  }

  @override
  Future<void> deleteProcessing(Package package) {
    return packageDataProvider.deleteProcessing(package);
  }

  @override
  Future<void> changeDeliveryAddress(String packageID, String deliveryID) {
    return packageDataProvider.changeDeliveryAddress(packageID, deliveryID);
  }

  @override
  Future<void> packageReturn(String packageID) {
    return packageDataProvider.packageReturn(packageID);
  }
}
