package com.lukouguoji.aerologic.page.car.list

import android.view.View
import com.lukouguoji.aerologic.databinding.ItemCarListBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.CarBean
import com.lukouguoji.module_base.bean.FlatcarBean

class CarListViewHolder(view: View) : BaseViewHolder<FlatcarBean, ItemCarListBinding>(view) {
    override fun onBind(item: Any?, position: Int) {
        val itemBean = getItemBean(item)!!
        binding.bean = itemBean

        binding.ivIcon.setOnClickListener {
            itemBean.checked.set(!itemBean.checked.get())
        }

        notifyItemClick(position, binding.llContent)
        notifyItemClick(position, binding.tvModify)
    }
}