package com.sambath.kunkhmer.adapter

import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.sambath.kunkhmer.screen.main.cflive.currentbets.CurrentBetsFragment
import com.sambath.kunkhmer.screen.main.cflive.todayreport.TodayReportFragment

private val TAB_TITLES = arrayOf(
    "Current Bets",
    "Today Report",
)
class MainPagerAdapter(
    var activity: AppCompatActivity
) : FragmentStateAdapter(activity) {
    override fun getItemCount(): Int {
        return 2
    }

    override fun createFragment(position: Int): Fragment {
        return when (position) {
            0 -> {
                CurrentBetsFragment.newInstance(position + 1)
            }
            1 -> {
                TodayReportFragment.newInstance(position + 1)
            }
            else -> CurrentBetsFragment.newInstance(position + 1)
        }
    }
}