package com.gamedog.vididin.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import com.ama.core.architecture.appBase.adapter.AppFragmentStateAdapter
import com.gamedog.vididin.beans.MainTabsItem
import com.gamedog.vididin.repository.MainTabType
import com.gamedog.vididin.router.Router


class MainViewPagerAdapter(activity: FragmentActivity) :
                AppFragmentStateAdapter<MainTabsItem>(activity, true) {

    override fun createFragment(position: Int, item: MainTabsItem): Fragment {
        return when (item.type) {
            MainTabType.HOME -> Router.Home.createHomeFragment()
            MainTabType.TASKS -> Router.Task.createTaskFragment()
            MainTabType.MINE -> Router.Mine.createMineFragment()
        }
    }
}