package es.verdnatura.domain

import android.content.Context
import es.verdnatura.presentation.view.feature.ajustes.model.Printers
import es.verdnatura.presentation.view.feature.ajustes.model.SectorItemVO
import es.verdnatura.presentation.view.feature.ajustes.model.Train
import retrofit2.Call

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

    fun getSectors(usuario: String, password: String): Call<List<SectorItemVO>> {
        return restClient!!.getSectors("json", "1", usuario, password, "application/json")
    }

    fun getSectorsSalix(token:String): Call<List<SectorItemVO>> {
        return salixClient!!.getSectorsSalix(content_type = "application/json", authorization = token)
    }
    fun worker_updateSector(usuario: String, password: String,sectorFk:String): Call<Unit> {
        val params: ArrayList<String> = ArrayList()
        params.add(sectorFk)
        return restClient!!.worker_updateSector("json", "1", usuario, password, "application/json",params)
    }
    fun operator_updateItemPackingType(usuario: String, password: String,itemPackingTypeFk:String): Call<Unit> {
        val params: ArrayList<String> = ArrayList()
        params.add(itemPackingTypeFk)
        return restClient!!.operator_updateItemPackingType("json", "1", usuario, password, "application/json",params)
    }
    fun worker_updatePrinter(usuario: String, password: String,labelerFk:String): Call<Unit> {
        val params: ArrayList<String> = ArrayList()
        params.add(labelerFk)
        return restClient!!.worker_updatePrinter("json", "1", usuario, password, "application/json",params)
    }

    fun printer_get(usuario: String, password: String): Call<List<Printers>> {
        return restClient!!.printer_get("json", "1", usuario, password, "application/json")
    }
    fun train_get(usuario: String, password: String): Call<List<Train>> {
        return restClient!!.train_get("json", "1", usuario, password, "application/json")
    }
    fun operator_getTrain(usuario: String, password: String): Call<String?> {

        return restClient!!.operator_getTrain("json", "1", usuario, password, "application/json")
    }
    fun operator_getItemPackingType(usuario: String, password: String): Call<String?> {

        return restClient!!.operator_getItemPackingType("json", "1", usuario, password, "application/json")
    }
    fun worker_isF11Allowed(usuario: String, password: String): Call<Boolean> {

        return restClient!!.worker_isF11Allowed("json", "1", usuario, password, "application/json")
    }

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