package com.lukouguoji.gjc.holder

import android.view.View
import com.lukouguoji.gjc.databinding.ItemGoodsAddShowBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.Warehouse

class GjcGoodsAddShowViewHolder(view: View) :
    BaseViewHolder<List<Warehouse>, ItemGoodsAddShowBinding>(view) {

    override fun onBind(item: Any?, position: Int) {
        val list = getItemBean(item) ?: return
        list.forEachIndexed { index, warehouse ->
            when (index) {
                0 -> binding.bean1 = warehouse
                1 -> binding.bean2 = warehouse
                2 -> binding.bean3 = warehouse
                3 -> binding.bean4 = warehouse
                4 -> binding.bean5 = warehouse
                else -> {}
            }
        }
    }
}