package com.aiosman.ravenow

object ConstVars {
    // api 地址 - 根据构建类型自动选择
    // Debug: http://192.168.0.201:8088
    // Release: https://rider-pro.aiosman.com/beta_api
    val BASE_SERVER = if (BuildConfig.DEBUG) {
        "http://47.109.137.67:6363"  // Debug环境
    } else {
        "https://rider-pro.aiosman.com/beta_api"  // Release环境
    }

    const val MOMENT_LIKE_CHANNEL_ID = "moment_like"
    const val MOMENT_LIKE_CHANNEL_NAME = "Moment Like"

    /**
     * 上传头像图片大小限制
     * 10M
     */
    const val AVATAR_FILE_SIZE_LIMIT = 1024 * 1024 * 10

    /**
     * 上传头像图片压缩时最大的尺寸
     * 512
     */
    const val AVATAR_IMAGE_MAX_SIZE = 512

    /**
     * 上传 banner 图片大小限制
     */
    const val BANNER_IMAGE_MAX_SIZE = 2048

    // 用户协议地址
    const val DICT_KEY_PRIVATE_POLICY_URL = "private_policy"
    // 重置邮箱间隔
    const val DIC_KEY_RESET_EMAIL_INTERVAL = "send_reset_password_timeout"
    // 开启google登录
    const val DICT_KEY_ENABLE_GOOGLE_LOGIN = "enable_google_login"
    // google登录clientid
    const val DICT_KEY_GOOGLE_LOGIN_CLIENT_ID = "google_login_client_id"
    // trtc功能开启
    const val DICT_KEY_ENABLE_TRTC = "enable_chat"
    // 举报选项
    const val DICT_KEY_REPORT_OPTIONS = "report_reasons"
}

enum class GuestLoginCheckOutScene {
    CREATE_POST,
    CREATE_AGENT,
    VIEW_MESSAGES,
    VIEW_PROFILE,
    JOIN_GROUP_CHAT,
    CHAT_WITH_AGENT,
    LIKE_MOMENT,
    COMMENT_MOMENT,
    FOLLOW_USER,
    REPORT_CONTENT
}

object GuestLoginCheckOut {
    var NeedLoginScene = listOf<GuestLoginCheckOutScene>(
        GuestLoginCheckOutScene.CREATE_POST,
        GuestLoginCheckOutScene.CREATE_AGENT,
        GuestLoginCheckOutScene.VIEW_MESSAGES,
        GuestLoginCheckOutScene.VIEW_PROFILE,
        GuestLoginCheckOutScene.JOIN_GROUP_CHAT,
        GuestLoginCheckOutScene.CHAT_WITH_AGENT,
        GuestLoginCheckOutScene.LIKE_MOMENT,
        GuestLoginCheckOutScene.COMMENT_MOMENT,
        GuestLoginCheckOutScene.FOLLOW_USER,
        GuestLoginCheckOutScene.REPORT_CONTENT
    )
    fun needLogin(scene: GuestLoginCheckOutScene): Boolean {
        return AppStore.isGuest && NeedLoginScene.contains(scene)
    }
}