package com.gh.gamecenter.qa.article.draft

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.constant.EntranceConsts
import com.gh.gamecenter.common.utils.updateStatusBarColor

class ArticleDraftActivity : 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, articleId: String? = null, onlyCreateDraft: Boolean = false): Intent {
            val bundle = Bundle()
            bundle.putString(EntranceConsts.KEY_COMMUNITY_ARTICLE_ID, articleId)
            bundle.putBoolean(EntranceConsts.KEY_ONLY_CREATE_DRAFT, onlyCreateDraft)
            return getTargetIntent(context, ArticleDraftActivity::class.java, ArticleDraftFragment::class.java, bundle)
        }
    }
}