package es.verdnatura.domain


import android.content.Context
import es.verdnatura.presentation.view.feature.ajustes.model.SectorItemVO
import es.verdnatura.presentation.view.feature.historicoshelving.model.ItemShelvingLog
import es.verdnatura.presentation.view.feature.historicoshelvinglog.model.ShelvingLog
import es.verdnatura.presentation.view.feature.historicoshelvinglog.model.ShelvingLogSalix
import retrofit2.Call

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


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

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

    fun Shelvings(
        token: String,
        vShelvingFilter: String,
    ): Call<List<ShelvingLogSalix>> {
        return salixClient!!.Shelvings(
            content_type = "application/json",
            authorization = token,
            filter = vShelvingFilter
        )
    }

    fun getSectorsSalix(token: String): Call<List<SectorItemVO>> {
        return salixClient!!.getSectorsSalix(
            content_type = "application/json",
            authorization = token
        )
    }


}