package es.verdnatura.domain

import android.content.Context
import es.verdnatura.presentation.view.feature.calidad.model.BuyerVO
import es.verdnatura.presentation.view.feature.faltas.model.ItemFaltasVO
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
import retrofit2.Call

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

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

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

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

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

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

}