import 'package:rasadyar_chicken/data/data_source/remote/poultry_science/poultry_science_remote.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/poultry_science/home_poultry_science/home_poultry_science_model.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);
  }
}
