package es.verdnatura.domain

import android.content.Context
import es.verdnatura.presentation.view.feature.smarttag.sacador.model.SmartTagRegister
import retrofit2.Call

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

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

    fun workerShelving_delete(usuario: String, password: String, vBarcode: String): Call<Void> {
        val params: ArrayList<String> = ArrayList()
        params.add(vBarcode)
        return restClient!!.workerShelving_delete(
            "json",
            "1",
            usuario,
            password,
            "application/json",
            params
        )
    }
    fun smartTagRegister(
        smarttag: String,
        shelving: String,
        level: String
    ): Call<SmartTagRegister>
    {
        //https://smart-tag.verdnatura.es/bindShelving/A0A3B8224DBF&ABC&1
        return nodejsClient!!.bindShelving("application/json", smarttag, shelving, level)
        // return nodejsClient!!.bindShelving("application/json", NodeJsService.SmartTagNode(smarttag, wagon, shelving),"A0A3B8224DBF","ABC","2")

    }
    fun smartTagInsertTicket(
        smarttag: String,

    ): Call<SmartTagRegister>
    {

        return nodejsClient!!.insertTicket("application/json", smarttag)

    }
}