package com.cheng.blzb.ui.fragment.guide.adapter

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.HotWordEntity
import com.example.base.extensions.getColor

class GuideItem4Adapter : BaseQuickAdapter<HotWordEntity.Child, BaseViewHolder>(R.layout.listitem_guide_item4) {
    override fun convert(holder: BaseViewHolder, item: HotWordEntity.Child) {
        holder.setText(R.id.tv_name, item.name)
        if (item.isChecked) {
            holder.setImageResource(R.id.iv_add, R.mipmap.ic_guide_item4_checked)
            holder.setTextColor(R.id.tv_name, getColor(R.color.color_125ffe))
        } else {
            holder.setImageResource(R.id.iv_add, R.mipmap.ic_guide_item4_default)
            holder.setTextColor(R.id.tv_name, getColor(R.color.color_1a1a1a))
        }
    }
}