package com.bassbooster.soundeffects.equalizer.view.activity.onboarding

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter
import com.bassbooster.soundeffects.equalizer.view.activity.onboarding.OnBoarding1Fragment
import com.bassbooster.soundeffects.equalizer.view.activity.onboarding.OnBoarding2Fragment
import com.bassbooster.soundeffects.equalizer.view.activity.onboarding.OnBoarding3Fragment

class OnBoardingPagerAdapter(fm: FragmentManager) : FragmentPagerAdapter(fm) {
    override fun getCount(): Int {
        return 3
    }

    override fun getItem(position: Int): Fragment {
        return when (position) {
            0 -> OnBoarding1Fragment()
            1 -> OnBoarding2Fragment()
            2 -> OnBoarding3Fragment()
            else -> throw IllegalArgumentException("Invalid position")
        }
    }
}