import '../app/constant.dart';
import '../models/response_save_work_suhu_model.dart';
import 'base_repository.dart';


class WorkInputSuhuRepository extends BaseRepository {
  WorkInputSuhuRepository({required super.dio});

  Future<ResponseSaveWorkSuhuModel> inputWorkSuhu({
    required String deliveryId,
    required String suhu
  }) async {
    final param = {
      "id": deliveryId,
      "suhu": suhu
    };

    print("param : $param");

    // Pengantaran Hasil => tipeID 1
    // Lain-lain => tipeID 4
    // Pengambilan Bahan => tipeID 5

    final service = "${Constant.baseUrl}v1/courier/mobile/process/update_temperatur_box/?id=$deliveryId&suhu=$suhu";
    final resp = await post(param: param, service: service);
    return ResponseSaveWorkSuhuModel.fromJson(resp);
  }
}
