package com.khmer9.lotto.screen.result

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

class Table1ListViewHolder(
    itemView: View

) : BaseListViewHolder(itemView) {
    private val ivCircle = itemView.findViewById<ImageView>(R.id.img_color)


    override fun bindView(item: BaseListItem) {
        when (item) {
            is Table1ListItem -> {

                with(item) {
                    if (color == 1){//1 is blue small
                        ivCircle.setImageResource(R.drawable.bg_circle_blue)

                    }else if (color ==2){//2 is red big
                        ivCircle.setImageResource(R.drawable.bg_circle_red)

                    }
                }


            }
        }
    }
}