package com.gh.gamecenter.gamedetail.history

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.feature.entity.GameEntity

class HistoryApkListActivity : ToolBarActivity() {

    companion object {
        fun getIntent(context: Context, gameEntity: GameEntity, entrance: String, path: String): Intent {
            val bundle = Bundle()
            bundle.putString(EntranceConsts.KEY_ENTRANCE, BaseActivity.mergeEntranceAndPath(entrance, path))
            bundle.putString(EntranceConsts.KEY_GAMEID, gameEntity.id)
            bundle.putParcelable(EntranceConsts.KEY_GAME, gameEntity)
            return getTargetIntent(
                context,
                HistoryApkListActivity::class.java,
                HistoryApkListFragment::class.java,
                bundle
            )
        }
    }

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

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setNavigationTitle(R.string.title_history_apk)
    }

}