package com.adealink.weparty.url

import android.net.Uri
import com.adealink.frame.base.AppBase
import com.adealink.weparty.debug.DebugPrefs
import com.adealink.weparty.network.RELEASE_HOSTS

/**
 * UrlConfig配置url
 */
object UrlConfig {

    private val isProdEnv =
        AppBase.isRelease || RELEASE_HOSTS.contains(Uri.parse(DebugPrefs.httpUrl).host)

    val serviceTerms = when {
        isProdEnv -> "https://web.gami.vip/about/termsOfService"
        else -> "https://test-web.gami.vip/about/termsOfService"
    }

    val privacyPolicy = when {
        isProdEnv -> "https://web.gami.vip/about/privacyPolicy"
        else -> "https://test-web.gami.vip/about/privacyPolicy"
    }

    val communityPolicy = when {
        AppBase.isProdEnv -> "https://web.gami.vip/about/communityGuideline"
        else -> "https://test-web.gami.vip/about/communityGuideline"
    }

    val deleteAccount = when {
        isProdEnv -> "https://web.gami.vip/mine/cancellation"
        else -> "https://test-web.gami.vip/mine/cancellation"
    }

    val rechargeDetail = when {
        isProdEnv -> "https://web.gami.vip/wallet/record"
        else -> "https://test-web.gami.vip/wallet/record"
    }

    val qrCodeShare = when {
        isProdEnv -> "https://web.gami.vip/user/category"
        else -> "https://test-web.gami.vip/user/category"
    }

    val posterShare = when {
        isProdEnv -> "https://web.gami.vip/user/profile"
        else -> "https://test-web.gami.vip/user/profile"
    }

    val playmateApply = when {
        isProdEnv -> "https://web.gami.vip/native/playmate/apply"
        else -> "https://test-web.gami.vip/native/playmate/apply"
    }

    val beanMore = when {
        isProdEnv -> "https://web.gami.vip/wallet/wd"
        else -> "https://test-web.gami.vip/wallet/wd"
    }
}