package com.gh.gamecenter.personalhome.followers

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

class FollowersActivity : ToolBarActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        updateStatusBarColor(R.color.background_white, R.color.background_white)
    }

    override fun isAutoResetViewBackgroundEnabled(): Boolean = true

    override fun onDarkModeChanged() {
        super.onDarkModeChanged()
        updateStatusBarColor(R.color.background_white, R.color.background_white)
    }

    companion object {
        fun getIntent(context: Context, userId: String, entrance: String, path: String): Intent {
            val bundle = Bundle()
            bundle.putString(EntranceConsts.KEY_USER_ID, userId)
            bundle.putString(EntranceConsts.KEY_ENTRANCE, BaseActivity.mergeEntranceAndPath(entrance, path))
            bundle.putString(FollowersOrFansFragment.PAGE_SOURCE, FollowersActivity::class.java.name)
            return getTargetIntent(context, FollowersActivity::class.java, FollowersOrFansFragment::class.java, bundle)
        }
    }
}