import 'package:rasadyar_chicken/data/data_source/remote/poultry_science/poultry_science_remote.dart';
import 'package:rasadyar_chicken/data/models/poultry_export/poultry_export.dart';
import 'package:rasadyar_chicken/data/models/request/kill_registration/kill_registration.dart';
import 'package:rasadyar_chicken/data/models/response/all_poultry/all_poultry.dart';
import 'package:rasadyar_chicken/data/models/response/approved_price/approved_price.dart';
import 'package:rasadyar_chicken/data/models/response/hatching/hatching_models.dart';
import 'package:rasadyar_chicken/data/models/response/hatching_report/hatching_report.dart';
import 'package:rasadyar_chicken/data/models/response/kill_house_poultry/kill_house_poultry.dart';
import 'package:rasadyar_chicken/data/models/response/kill_request_poultry/kill_request_poultry.dart';
import 'package:rasadyar_chicken/data/models/response/poultry_farm/poultry_farm.dart';
import 'package:rasadyar_chicken/data/models/response/poultry_hatching/poultry_hatching.dart';
import 'package:rasadyar_chicken/data/models/response/poultry_order/poultry_order.dart';
import 'package:rasadyar_chicken/data/models/response/poultry_science/home_poultry_science/home_poultry_science_model.dart';
import 'package:rasadyar_chicken/data/models/response/sell_for_freezing/sell_for_freezing.dart';
import 'package:rasadyar_core/core.dart';

import 'poultry_science_repository.dart';

class PoultryScienceRepositoryImp implements PoultryScienceRepository {
  final PoultryScienceRemoteDatasource datasource;

  PoultryScienceRepositoryImp(this.datasource);

  @override
  Future<HomePoultryScienceModel?> getHomePoultry({
    required String token,
    required String type,
  }) async => await datasource.getHomePoultryScience(token: token, type: type);

  @override
  Future<PaginationModel<HatchingModel>?> getHatchingPoultry({
    required String token,
    Map<String, dynamic>? queryParameters,
  }) async => await datasource.getHatchingPoultry(token: token, queryParameters: queryParameters);

  @override
  Future<void> submitPoultryScienceReport({
    required String token,
    required FormData data,
    ProgressCallback? onSendProgress,
  }) async => await datasource.submitPoultryScienceReport(
    token: token,
    data: data,
    onSendProgress: onSendProgress,
  );

  @override
  Future<PaginationModel<HatchingReport>?> getHatchingPoultryReport({
    required String token,
    Map<String, dynamic>? queryParameters,
  }) async {
    return await datasource.getPoultryScienceReport(token: token, queryParameters: queryParameters);
  }

  @override
  Future<PaginationModel<PoultryFarm>?> getPoultryScienceFarmList({
    required String token,
    Map<String, dynamic>? queryParameters,
  }) async {
    return await datasource.getPoultryScienceFarmList(
      token: token,
      queryParameters: queryParameters,
    );
  }

  @override
  Future<ApprovedPrice?> getApprovedPrice({
    required String token,
    Map<String, dynamic>? queryParameters,
  }) async {
    return await datasource.getApprovedPrice(token: token, queryParameters: queryParameters);
  }

  @override
  Future<List<AllPoultry>?> getAllPoultry({
    required String token,
    Map<String, dynamic>? queryParameters,
  }) async {
    return await datasource.getAllPoultry(token: token, queryParameters: queryParameters);
  }

  @override
  Future<PoultryExport?> getPoultryExport({
    required String token,
    Map<String, dynamic>? queryParameters,
  }) async {
    return await datasource.getPoultryExport(token: token, queryParameters: queryParameters);
  }

  @override
  Future<SellForFreezing?> getSellForFreezing({
    required String token,
    Map<String, dynamic>? queryParameters,
  }) async {
    return await datasource.getSellForFreezing(token: token, queryParameters: queryParameters);
  }

  @override
  Future<List<KillRequestPoultry>?> getUserPoultry({
    required String token,
    Map<String, dynamic>? queryParameters,
  }) async {
    return await datasource.getUserPoultry(token: token, queryParameters: queryParameters);
  }

  @override
  Future<List<PoultryHatching>?> getPoultryHatching({
    required String token,
    Map<String, dynamic>? queryParameters,
  }) async {
    return await datasource.getPoultryHatching(token: token, queryParameters: queryParameters);
  }

  @override
  Future<List<KillHousePoultry>?> getKillHouseList({
    required String token,
    Map<String, dynamic>? queryParameters,
  }) async {
    return await datasource.getKillHouseList(token: token, queryParameters: queryParameters);
  }

  @override
  Future<void> submitKillRegistration({
    required String token,
    required KillRegistrationRequest request,
  }) async {
    await datasource.submitKillRegistration(token: token, request: request);
  }

  @override
  Future<PaginationModel<PoultryOrder>?> getPoultryOderList({
    required String token,
    Map<String, dynamic>? queryParameters,
  }) async {
    return await datasource.getPoultryOderList(token: token, queryParameters: queryParameters);
  }

  @override
  Future<void> deletePoultryOder({
    required String token,
    required String orderId,
  }) async {
    await datasource.deletePoultryOder(token: token, orderId: orderId);
  }
}
