package com.cheng.blzb.ui.fragment.bid.publish.contacts

import android.graphics.Typeface
import android.widget.TextView
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.ContactsEntity
import com.example.base.extensions.getColor

class ContactsJobAdapter : BaseQuickAdapter<ContactsEntity.Job, BaseViewHolder>(R.layout.listitem_contacts_job) {
    override fun convert(holder: BaseViewHolder, item: ContactsEntity.Job) {
        holder.setText(R.id.tv_name, item.name)
        holder.setTextColor(R.id.tv_name, if (item.isChecked) getColor(R.color.color_125ffe) else getColor(R.color.color_1a1a1a))
        holder.getView<TextView>(R.id.tv_name).typeface = if (item.isChecked) Typeface.DEFAULT_BOLD else Typeface.DEFAULT
    }
}