package com.gh.common.provider

import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.common.filter.RegionSettingHelper
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.feature.entity.IpInfo
import com.gh.gamecenter.feature.provider.IRegionSettingHelperProvider

@Route(path = RouteConsts.provider.regionSettingHelper, name = "RegionSettingHelper暴露服务")
class RegionSettingHelperProviderImpl : IRegionSettingHelperProvider {
    override fun shouldThisGameDisplayMirrorInfo(gameId: String): Boolean {
        return RegionSettingHelper.shouldThisGameDisplayMirrorInfo(gameId)
    }

    override fun getMirrorPosition(gameId: String): Int {
        return RegionSettingHelper.getMirrorPosition(gameId)
    }

    override fun shouldThisGameShowSpecialDownload(gameId: String): Boolean {
        return RegionSettingHelper.shouldThisGameShowSpecialDownload(gameId)
    }

    override fun filterGame(list: List<GameEntity>): ArrayList<GameEntity> {
        return RegionSettingHelper.filterGame(list)
    }

    override fun getIpInfo(): IpInfo? {
        return RegionSettingHelper.getIpInfo()
    }

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