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 Table3ListViewHolder (
    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 Table3ListItem -> {
                with(item) {
                    when (oddEvenNumber) {
                        1 -> {//1 is blue
                            ivCircle.setImageResource(R.drawable.bg_circle_aqua)
                            tvNumber.text = "ស"
                        }
                        2 -> {//2 is blue
                            ivCircle.setImageResource(R.drawable.bg_circle_blue)
                            tvNumber.text = "គ"
                        }
                    }
                }
            }
        }
    }
}