package com.example.shiftalarm

import android.os.Bundle
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter

class SettingsPagerAdapter(fragmentActivity: FragmentActivity) : FragmentStateAdapter(fragmentActivity) {
    override fun getItemCount(): Int = 4

    override fun createFragment(position: Int): Fragment {
        return when (position) {
            0 -> FragmentSettingsBasic()
            1 -> FragmentSettingsAlarm()
            2 -> FragmentSettingsAdditional()
            3 -> FragmentSettingsLab()
            else -> FragmentSettingsBasic()
        }
    }
}
