package com.gh.gamecenter.qa.editor

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

/**
 * 发布帖子-引用游戏/选择游戏
 */
class GameActivity : ToolBarActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        updateStatusBarColor(com.gh.gamecenter.common.R.color.ui_surface, com.gh.gamecenter.common.R.color.ui_surface)
    }

    override fun provideNormalIntent(): Intent {
        return getTargetIntent(this, GameActivity::class.java, GameFragment::class.java)
    }

    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)
    }

    companion object {
        fun getIntent(context: Context, title: String): Intent {
            val bundle = bundleOf(
                EntranceConsts.KEY_NAVIGATION_TITLE to title
            )
            return getTargetIntent(context, GameActivity::class.java, GameFragment::class.java, bundle)
        }

        const val INSERT_GAME_TITLE = "插入游戏"
        const val SELECT_GAME_TITLE = "选择游戏"
    }
}
