package com.gh.gamecenter.gamedetail.fuli.kaifu

import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.fragment.app.Fragment
import com.gh.gamecenter.R
import com.gh.gamecenter.common.base.activity.BaseActivity_TabLayout
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.common.utils.updateStatusBarColor
import com.therouter.router.Route

@Route(
    path = RouteConsts.activity.serversCalendarManagementActivity,
    description = "开服订阅"
)
class ServersCalendarManagementActivity : BaseActivity_TabLayout() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setNavigationTitle(R.string.servers_calendar_subscription_title)
        updateStatusBarColor(com.gh.gamecenter.common.R.color.ui_surface, com.gh.gamecenter.common.R.color.ui_surface)
    }

    override fun initFragmentList(fragments: MutableList<Fragment>?) {
        fragments?.add(ServersCalendarListFragment())
        fragments?.add(ServersCalendarRemindListFragment())
    }

    override fun initTabTitleList(tabTitleList: MutableList<String>?) {
        tabTitleList?.add(getString(R.string.servers_calendar_list_tab))
        tabTitleList?.add(getString(R.string.servers_calendar_remind_list_tab))
    }

    override fun onDarkModeChanged() {
        super.onDarkModeChanged()
        updateStatusBarColor(com.gh.gamecenter.common.R.color.ui_surface, com.gh.gamecenter.common.R.color.ui_surface)
    }

    companion object {
        fun getIntent(context: Context): Intent {
            return Intent(context, ServersCalendarManagementActivity::class.java)
        }
    }
}