package com.zswc.creativity.adapter

import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.zswc.creativity.R
import com.zswc.creativity.databinding.ItemTypeBinding
import com.zswc.creativity.inte.ChoiceData
import com.zswc.creativity.model.DataInfoBean
import com.ysnows.base.base.BAdapter

class AllCarAdapter(val chose: ChoiceData) : BAdapter<DataInfoBean.CarTypeBean,
        BaseDataBindingHolder<ItemTypeBinding>>(R.layout.item_type) {


    override fun convert(holder: BaseDataBindingHolder<ItemTypeBinding>, item: DataInfoBean.CarTypeBean) {

        holder.dataBinding?.item = item
        holder.dataBinding?.ll!!.setOnClickListener {
           if(null!=chose){
               holder.adapterPosition
               chose.onRestuse(holder.adapterPosition.toString())
           }


        }

    }
}
