package es.verdnatura.domain

import android.content.Context
import es.verdnatura.presentation.view.feature.historicovehiculo.model.ItemHistoricoVehiculo
import retrofit2.Call

class GetVehicleControlTimeUserCase(context: Context) : RestClient(context) {

    fun machineWorker_add(
        usuario: String,
        password: String,
        plateNumber: String
    ): Call<Boolean> {
        val params: ArrayList<String> = ArrayList()
        params.add(plateNumber)
        return restClient!!.machineWorker_add(
            "json",
            "1",
            usuario,
            password,
            "application/json",
            params
        )
    }

    fun machineWorker_update(
        usuario: String,
        password: String,
        plateNumber: String
    ): Call<Boolean> {
        val params: ArrayList<String> = ArrayList()
        params.add(plateNumber)
        return restClient!!.machineWorker_update(
            "json",
            "1",
            usuario,
            password,
            "application/json",
            params
        )
    }



    fun workerMachinery_isRegistered(
        usuario: String,
        password: String
    ): Call<String> {
        val params: ArrayList<String> = ArrayList()
        return restClient!!.workerMachinery_isRegistered(
            "json",
            "1",
            usuario,
            password,
            "application/json",
            params
        )
    }


    fun machine_getWorkerPlate(usuario: String, password: String): Call<String> {
        val params: ArrayList<String> = ArrayList()
        return restClient!!.machine_getWorkerPlate(
            "json",
            "1",
            usuario,
            password,
            "application/json",
            params
        )
    }

    fun deviceProductionUser_getWorker(
        usuario: String,
        password: String,
        userFk: String
    ): Call<String> {
        val params: ArrayList<String> = ArrayList()
        params.add(userFk)
        return restClient!!.deviceProductionUser_getWorker(
            "json",
            "1",
            usuario,
            password,
            "application/json",
            params
        )
    }

    fun deviceProduction_getnameDevice(
        usuario: String,
        password: String,
        android_id: String
    ): Call<String> {
        val params: ArrayList<String> = ArrayList()
        params.add(android_id)
        return restClient!!.deviceProduction_getnameDevice(
            "json",
            "1",
            usuario,
            password,
            "application/json",
            params
        )
    }

    fun machineWorker_getHistorical(
        usuario: String,
        password: String,
        PlateNumber: String
    ): Call<List<ItemHistoricoVehiculo>> {
        val params: ArrayList<String> = ArrayList()
        params.add(PlateNumber)
        return restClient!!.machineWorker_getHistorical(
            "json",
            "1",
            usuario,
            password,
            "application/json",
            params
        )
    }

}