package com.gh.common.provider

import com.gh.common.constant.Config
import com.gh.gamecenter.core.provider.IConfigProvider

@com.therouter.inject.ServiceProvider
class ConfigProviderImpl : IConfigProvider {
    override fun getTencentAppId(): String {
        return Config.TENCENT_APPID
    }

    override fun getWechatAppId(): String {
        return Config.WECHAT_APPID
    }

    override fun getWechatSecret(): String {
        return Config.WECHAT_SECRET
    }

    override fun getUploadLimitSize(): Long {
        return Config.getSettings()?.image?.uploadLimitSize ?: 0L
    }

    override fun getSize(): Int {
        return Config.getSettings()?.image?.size ?: 0
    }

    override fun getRatio(): Int {
        return Config.getSettings()?.image?.ratio ?: 0
    }

    override fun getQuality(): Int {
        return Config.getSettings()?.image?.quality ?: 0
    }

    override fun getGif(): String {
        return Config.getSettings()?.image?.oss?.gif ?: ""
    }

    override fun getJpeg(): String {
        return Config.getSettings()?.image?.oss?.jpeg ?: ""
    }

    override fun getWebp(): String {
        return Config.getSettings()?.image?.oss?.webp ?: ""
    }

    override fun getGitThumb(): String {
        return Config.getSettings()?.image?.oss?.gitThumb ?: ""
    }

    override fun getGifWaterMark(): String {
        return Config.getSettings()?.image?.oss?.gifWaterMark ?: ""
    }

    override fun getVideoSnapshotSuffix(): String {
        return Config.getSettings()?.image?.oss?.snapshot ?: ""
    }

    override fun getImageCropSuffix(): String {
        return Config.getSettings()?.image?.oss?.crop ?: ""
    }

    override fun getImageInfoSuffix(): String {
        return Config.getSettings()?.image?.oss?.info ?: ""
    }

    override fun getImageResizeSuffix(): String {
        return Config.getSettings()?.image?.oss?.resize ?: ""
    }

    override fun getQQ(): String {
        return Config.getSettings()?.support?.qq ?: ""
    }

    override fun getQQun(): String {
        return Config.getSettings()?.support?.qQun ?: ""
    }

    override fun getQQunKey(): String {
        return Config.getSettings()?.support?.qQunKey ?: ""
    }

    override fun getQuickLoginAppId(): String {
        return Config.QUICK_LOGIN_APPID
    }

    override fun getQuickLoginAppKey(): String {
        return Config.QUICK_LOGIN_APPKEY
    }

    override fun getWeiboAppKey(): String {
        return Config.WEIBO_APPKEY
    }

    override fun getNightModeSetting(): Boolean {
        return Config.getNightModeSetting()?.setting ?: false
    }

    override fun isJiguangSwitch(): Boolean {
        return Config.getNewApiSettingsEntity()?.jiguangSwitch ?: false
    }
}