package com.gh.gamecenter.help

import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.therouter.TheRouter
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.common.entity.SimpleGameEntity
import com.gh.gamecenter.common.entity.SuggestType
import com.gh.gamecenter.common.provider.IHelpAndFeedbackProvider

object HelpAndFeedbackBridge {
    private val mHelpAndFeedbackHelp by lazy {
        TheRouter.get(IHelpAndFeedbackProvider::class.java)
    }

    @JvmStatic
    fun startSuggestionActivity(
        context: Context?,
        suggestType: SuggestType?,
        suggestHintType: String?,
        content: String?
    ) {
        mHelpAndFeedbackHelp?.startSuggestionActivity(context, suggestType, suggestHintType, content)
    }

    @JvmStatic
    fun startSuggestionActivity(
        context: Context?,
        suggestType: SuggestType?,
        suggestHintType: String?,
        content: String?,
        game: SimpleGameEntity?
    ) {
        mHelpAndFeedbackHelp?.startSuggestionActivity(context, suggestType, suggestHintType, content, game)
    }

    @JvmStatic
    fun startSuggestionActivity(context: Context?, suggestType: SuggestType?, hint: String?) {
        mHelpAndFeedbackHelp?.startSuggestionActivity(context, suggestType, hint)
    }

    @JvmStatic
    fun getIntent(
        context: Context?,
        suggestType: SuggestType?,
        hiddenHint: String?,
        suggestHintType: String?,
        content: String?,
        game: SimpleGameEntity?,
        isQaFeedback: Boolean,
        qaContentId: String?,
        fromRatingKey: Boolean,
        diagnosis: String,
        forceLogin: Boolean,
        isSmoothGame: Boolean
    ): Intent? {
        return mHelpAndFeedbackHelp?.getIntent(
            context,
            suggestType,
            hiddenHint,
            suggestHintType,
            content,
            game,
            isQaFeedback,
            qaContentId,
            fromRatingKey,
            diagnosis,
            forceLogin,
            isSmoothGame
        )
    }

    @JvmStatic
    fun getSuggestionCategoryIntent(context: Context, bundle: Bundle? = null): Intent? {
        return mHelpAndFeedbackHelp?.getSuggestionCategoryIntent(context, bundle)
    }
}