package com.khmer9.yuki.screen.result

import android.view.View
import android.widget.ImageView
import android.widget.TextView
import com.gdtlib.lib.adapter.BaseListItem
import com.gdtlib.lib.viewholder.BaseListViewHolder
import com.khmer9.yuki.R

class Table4ListViewHolder (
    itemView: View
) : BaseListViewHolder(itemView) {
    private val ivCircle = itemView.findViewById<ImageView>(R.id.img_color)
    private val tvNumber = itemView.findViewById<TextView>(R.id.tv_number)
    override fun bindView(item: BaseListItem) {
        when (item) {
            is Table4ListItem -> {
                with(item) {
//                    tvNumber.text = blueRedNumber.toString()
                    when (blueRedNumber) {
                        1 -> {//1 is blue
                            ivCircle.setImageResource(R.drawable.bg_circle_blue)
                        }
                        2 -> {//2 is red
                            ivCircle.setImageResource(R.drawable.bg_circle_red)
                        }
                    }
                }
            }
        }
    }
}