package com.yzx.ebrand.config

import com.yzx.ebrand.BuildConfig
import com.yzx.ebrand.model.StuChangeType

object Config {
    var BASE_URL = BuildConfig.BASE_URL
    var APP_NAME = BuildConfig.APP_NAME
    var M_URL = BuildConfig.M_URL
    var OA_URL = BuildConfig.OA_URL
    var WS_URL = BuildConfig.WS_URL
    var MP_APPID = BuildConfig.MP_APPID
    val APP_ID = BuildConfig.APP_ID
    var MP_ID = BuildConfig.MP_ID
    var ENV_NAME = BuildConfig.ENV_NAME

    fun getEvn(): YzxEnv {
        when (ENV_NAME) {
            "qbj" -> {
                return YzxEnv(
                    APP_NAME = "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/unit/app/base-logo-txt-qbj.png",
                    LOGO = "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/unit/app/login-logo.png",
                    ENV_NAME = ENV_NAME,
                    MP_APPID = MP_APPID,
                    MP_ID = MP_ID,
                    WS_URL = WS_URL
                )
            }
            "cszxy" -> {
                return YzxEnv(
                    APP_NAME = "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/unit/app/base-logo-txt-cszxy.png",
                    LOGO = "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/unit/app/login-logo.png",
                    ENV_NAME = ENV_NAME,
                    MP_APPID = MP_APPID,
                    MP_ID = MP_ID,
                    WS_URL = WS_URL
                )
            }

            "kz" -> {
                return YzxEnv(
                    APP_NAME = "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/unit/logo/name-kezhong.png",
                    LOGO = "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/unit/logo/logo-kezhong.png",
                    ENV_NAME = ENV_NAME,
                    MP_APPID = MP_APPID,
                    MP_ID = "101",
                    WS_URL = WS_URL
                )
            }

            else -> return YzxEnv(
                APP_NAME = "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/unit/app/base-logo-txt-qbj.png",
                LOGO = "https://oa-edu-1259243469.cos.ap-chengdu.myqcloud.com/public/unit/app/login-logo.png",
                ENV_NAME = ENV_NAME,
                MP_APPID = MP_APPID,
                MP_ID = MP_ID,
                WS_URL = WS_URL
            )
        }
    }


    const val STU_CHANGE_STATUS_DROP_OUT = 42001
    const val STU_CHANGE_STATUS_LEAVE_SCHOOL = 42002
    const val STU_CHANGE_STATUS_RETURN_SCHOOL = 42003
    const val STU_CHANGE_STATUS_OUT_SCHOOL = 42004
    const val STU_CHANGE_STATUS_TRANSFER_SCHOOL = 42005
    const val STU_CHANGE_STATUS_REPEAT = 42006
    const val STU_CHANGE_STATUS_DOWNGRADE = 42007
    const val STU_CHANGE_STATUS_TRANSFER_OUT = 42008
    const val STU_CHANGE_STATUS_INTROSPECTION = 42009
    const val STU_CHANGE_STATUS_INTERNSHIP = 42010

    val STU_CHANGE_STATUS_LIST = mutableListOf(
        StuChangeType(STU_CHANGE_STATUS_DROP_OUT,"辍学",""),
        StuChangeType(STU_CHANGE_STATUS_LEAVE_SCHOOL,"休学",""),
        StuChangeType(STU_CHANGE_STATUS_RETURN_SCHOOL,"复学",""),
        StuChangeType(STU_CHANGE_STATUS_OUT_SCHOOL,"退学",""),
        StuChangeType(STU_CHANGE_STATUS_TRANSFER_SCHOOL,"转学",""),
        StuChangeType(STU_CHANGE_STATUS_REPEAT,"留级",""),
        StuChangeType(STU_CHANGE_STATUS_TRANSFER_OUT,"转出",""),
        StuChangeType(STU_CHANGE_STATUS_DOWNGRADE,"降级",""),
        StuChangeType(STU_CHANGE_STATUS_INTROSPECTION,"回家反省","反省"),
        StuChangeType(STU_CHANGE_STATUS_INTERNSHIP,"实习","反省")
    )
}

data class YzxEnv(
    var APP_NAME: String,
    var LOGO: String,
    var ENV_NAME: String,
    var MP_APPID: String,
    var MP_ID: String,
    var WS_URL: String
)