package com.gh.gamecenter.forum.moderator

import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.gh.gamecenter.common.base.activity.ToolBarActivity
import com.gh.gamecenter.common.constant.EntranceConsts
import com.gh.gamecenter.common.utils.updateStatusBarColor

/**
 * 版主列表
 */
class ModeratorListActivity : ToolBarActivity() {

    companion object {
        fun getIntent(
            context: Context,
            bbsId: String,
            bbsName: String,
            bbsType: String,
            entrance: String,
            path: String
        ): Intent {
            val bundle = Bundle()
            bundle.putString(EntranceConsts.KEY_ENTRANCE, entrance)
            bundle.putString(EntranceConsts.KEY_PATH, path)
            bundle.putString(EntranceConsts.KEY_BBS_ID, bbsId)
            bundle.putString(EntranceConsts.KEY_NAME, bbsName)
            bundle.putString(EntranceConsts.KEY_TYPE, bbsType)
            return getTargetIntent(
                context,
                ModeratorListActivity::class.java,
                ModeratorListFragment::class.java,
                bundle
            )
        }
    }

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

    override fun isAutoResetViewBackgroundEnabled(): Boolean = true

    override fun onDarkModeChanged() {
        super.onDarkModeChanged()

        updateStatusBarColor(com.gh.gamecenter.common.R.color.ui_surface, com.gh.gamecenter.common.R.color.ui_surface)
    }
}