package com.pan_american.android.data.model.common.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter

open class ViewPager2Adapter(fragmentActivity: FragmentActivity, private val list: MutableList<Fragment>): FragmentStateAdapter(fragmentActivity) {

    override fun getItemCount() = list.size

    override fun createFragment(position: Int) = list[position]

}