package com.lukouguoji.gjj.holder

import android.view.View
import com.lukouguoji.gjj.databinding.ItemIntImpPickUpDlvBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.IntImpPickUpDLVBean

/**
 * 国际进港-提取出库 列表项ViewHolder
 */
class IntImpPickUpDLVViewHolder(view: View) :
    BaseViewHolder<IntImpPickUpDLVBean, ItemIntImpPickUpDlvBinding>(view) {

    override fun onBind(item: Any?, position: Int) {
        val bean = getItemBean(item) ?: return
        binding.bean = bean
        binding.position = position
        binding.executePendingBindings()

        // 点击图标切换选中状态
        binding.ivIcon.setOnClickListener {
            bean.checked.set(!bean.checked.get())
            binding.executePendingBindings()
        }
    }
}
