package com.gh.common.provider

import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.util.DirectUtils
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.common.entity.LinkEntity
import com.gh.gamecenter.common.entity.SimpleGameEntity
import com.gh.gamecenter.common.entity.SuggestType
import com.gh.gamecenter.feature.exposure.ExposureEvent
import com.gh.gamecenter.feature.provider.ILinkDirectUtilsProvider

@Route(path = RouteConsts.provider.linkDirectUtils, name = "DirectUtils暴露服务，主要是暴露directToLinkPage方法")
class LinkDirectUtilsProviderImpl : ILinkDirectUtilsProvider {

    override fun directToLinkPage(
        context: Context,
        linkEntity: LinkEntity,
        entrance: String,
        path: String
    ) {
        DirectUtils.directToLinkPage(context, linkEntity, entrance, path)
    }

    override fun directToLinkPage(
        context: Context,
        linkEntity: LinkEntity,
        entrance: String,
        path: String,
        exposureEvent: ExposureEvent?
    ) {
        DirectUtils.directToLinkPage(context, linkEntity, entrance, path, exposureEvent)
    }

    override fun directToSuggestion(context: Context, type: SuggestType, requestCode: Int?) {
        DirectUtils.directToSuggestion(context, type, requestCode)
    }

    override fun directToSuggestion(
        context: Context,
        type: SuggestType,
        suggestHintType: String?,
        content: String?,
        isQaFeedback: Boolean,
        qaContentId: String
    ) {
        DirectUtils.directToSuggestion(context, type, suggestHintType, content, isQaFeedback, qaContentId)
    }

    override fun directToSuggestion(
        context: Context,
        type: SuggestType,
        suggestHintType: String?,
        content: String?,
        game: SimpleGameEntity,
        platform: String
    ) {
        DirectUtils.directToSuggestion(context, type, suggestHintType, content, game, platform)
    }

    override fun directToSuggestion(context: Context, type: SuggestType, hiddenHint: String) {
        DirectUtils.directToSuggestion(context, type, hiddenHint)
    }

    override fun init(context: Context?) {
        // Do nothing
    }
}