package com.gh.gamecenter.common.pagelevel

object PageLevelManager {

    const val TAG = "PageLevelManager"
    const val KEY_PAGE_LEVEL = "page_level"

    // 当前页面的 PageLevel
    private var currentPageLevel: PageLevel? = null
    // 下一个 Activity 是否作为顶级页面 (F)
    private var nextActivityAsSupremePageLevel = false

    fun isCurrentActivityAsSupremePageLevel(): Boolean {
        return nextActivityAsSupremePageLevel
    }

    fun markSupremePageLevelIsUsed() {
        nextActivityAsSupremePageLevel = false
    }

    fun setNextPageAsSupremePageLevel() {
        nextActivityAsSupremePageLevel = true
    }

    fun getCurrentPageLevel(): PageLevel? {
        return currentPageLevel
    }

    fun setCurrentPageLevel(pageLevel: PageLevel) {
        currentPageLevel = pageLevel
    }

}