package com.gh.gamecenter.energy.view

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.core.utils.DisplayUtils

class EnergyHouseActivity : ToolBarActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        hideToolbar(true)
        DisplayUtils.transparentStatusAndNavigation(this)
    }

    companion object {
        fun getIntent(context: Context?) = getIntent(context, null)

        fun getIntent(context: Context?, categoryId: String? = null): Intent? {
            if (categoryId != null) {
                val bundle = Bundle()
                bundle.putString(EntranceConsts.KEY_CATEGORY_ID, categoryId)
                return getTargetIntent(
                    context,
                    EnergyHouseActivity::class.java,
                    EnergyHouseFragment::class.java,
                    bundle
                )
            }
            return getTargetIntent(context, EnergyHouseActivity::class.java, EnergyHouseFragment::class.java)
        }
    }
}