package com.lukouguoji.gjc.holder

import android.view.View
import com.lukouguoji.gjc.databinding.ItemAssemblePositionBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.AssemblePositionBean

/**
 * 组装位置ViewHolder
 */
class AssemblePositionViewHolder(view: View) :
    BaseViewHolder<AssemblePositionBean, ItemAssemblePositionBinding>(view) {

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

        // 点击选择位置
        itemView.setOnClickListener {
            clickListener?.onItemClick(position, 0)
        }

        binding.executePendingBindings()
    }
}
