package com.cheng.blzb.ui.fragment.search.list

import android.graphics.Color
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.cheng.blzb.R
import com.cheng.blzb.bean.SearchOptionEntity

class SearchOptionParentAdapter: BaseQuickAdapter<SearchOptionEntity, BaseViewHolder>(R.layout.listitem_search_option_parent) {
    override fun convert(holder: BaseViewHolder, item: SearchOptionEntity) {
        holder.setText(R.id.tv_name, item.title)
        holder.setVisible(R.id.view_tag, item.isChecked)
        holder.itemView.setBackgroundColor(if (item.isChecked) Color.WHITE else Color.TRANSPARENT)
    }
}