package com.swago.room.audio

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.swago.baseswago.cusview.SwagoLevelView
import com.swago.baseswago.model.live.audio.AudioInviteUserModel
import com.swago.loadUrl
import com.swago.room.R
import de.hdodenhof.circleimageview.CircleImageView

class AudioInviteAdapter : BaseQuickAdapter<AudioInviteUserModel, BaseViewHolder>(R.layout.item_audio_invite, arrayListOf()) {
    override fun convert(helper: BaseViewHolder, item: AudioInviteUserModel) {
        helper.apply {
            setText(R.id.tvName,item.user_name)
            itemView.findViewById<CircleImageView>(R.id.ivAvatar).loadUrl(mContext,item.user_head_img_url)
            itemView.findViewById<SwagoLevelView>(R.id.tvLevel).setUserLevel(item.user_wealth_level)
            addOnClickListener(R.id.tvInvite)
        }
    }
}