package com.gh.gamecenter.help

import android.content.Context
import android.content.Intent
import com.alibaba.android.arouter.launcher.ARouter
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 {
        ARouter.getInstance().build(RouteConsts.provider.helpAndFeedback).navigation() as? IHelpAndFeedbackProvider
    }

    @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?,
        isQaFeedback: Boolean,
        qaContentId: String?
    ) {
        mHelpAndFeedbackHelp?.startSuggestionActivity(
            context,
            suggestType,
            suggestHintType,
            content,
            isQaFeedback,
            qaContentId
        )
    }

    @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?,
        suggestHintType: String?,
        content: String?,
        game: SimpleGameEntity?,
        gamePlatform: String?
    ) {
        mHelpAndFeedbackHelp?.startSuggestionActivity(
            context,
            suggestType,
            suggestHintType,
            content,
            game,
            gamePlatform
        )
    }

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

    @JvmStatic
    fun getIntentFromNetworkDiagnosis(context: Context?, diagnosis: String?): Intent? {
        return mHelpAndFeedbackHelp?.getIntentFromNetworkDiagnosis(context, diagnosis)
    }

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