package com.gh.gamecenter.qa.draft

import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.fragment.app.Fragment
import com.gh.gamecenter.common.base.activity.BaseActivity_TabLayout
import com.gh.gamecenter.common.utils.updateStatusBarColor
import com.gh.gamecenter.qa.article.draft.ArticleDraftFragment
import com.gh.gamecenter.qa.questions.draft.QuestionDraftFragment
import com.gh.gamecenter.video.videomanager.VideoDraftFragment

/**
 * 我的草稿
 */
class CommunityDraftWrapperActivity : BaseActivity_TabLayout() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setNavigationTitle("我的草稿")
        updateStatusBarColor(com.gh.gamecenter.common.R.color.ui_surface, com.gh.gamecenter.common.R.color.ui_surface)
    }

    override fun initFragmentList(fragments: MutableList<Fragment>) {
        fragments.add(ArticleDraftFragment())
        fragments.add(QuestionDraftFragment())
        fragments.add(VideoDraftFragment())
    }

    override fun initTabTitleList(tabTitleList: MutableList<String>) {
        tabTitleList.add("帖子草稿")
        tabTitleList.add("问题草稿")
        tabTitleList.add("视频草稿")
    }

    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 {
        @JvmStatic
        fun getIntent(context: Context): Intent {
            return Intent(context, CommunityDraftWrapperActivity::class.java)
        }

    }
}
