package com.swago.room.lianmai

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.swago.baseswago.cusview.LiangView
import com.swago.baseswago.cusview.SwagoImageView
import com.swago.baseswago.cusview.SwagoLevelView
import com.swago.baseswago.model.live.mic.LianMaiUserModel
import com.swago.room.R

class AnchorLianMaiListAdapter : BaseQuickAdapter<LianMaiUserModel,BaseViewHolder>(R.layout.item_anchor_lian_mai, arrayListOf()) {
    override fun convert(helper: BaseViewHolder?, item: LianMaiUserModel?) {
        helper?.apply {
            item?.let {
                setText(R.id.tvName, it.lianmai_user_name)
                itemView.findViewById<SwagoLevelView>(R.id.ivLevelView).setUserLevel(it.lianmai_user_level)
                itemView.findViewById<SwagoImageView>(R.id.ivSwagoAvatar).loadImage(it.lianmai_user_head_img_url?:"")
                itemView.findViewById<LiangView>(R.id.tvID)
                    .setUserId(it.is_pretty_account == 1, it.user_id ?: "")
                addOnClickListener(R.id.ivRefuse)
                addOnClickListener(R.id.ivAccept)
            }
        }
    }


}