package com.isidroid.c23.constant

import androidx.annotation.StringDef

@Retention(AnnotationRetention.SOURCE)
@StringDef(AppBuildType.DEV, AppBuildType.PROD, AppBuildType.STAGE, AppBuildType.MOCK)
annotation class AppBuildType {
    companion object {
        const val MOCK = "MOCK"
        const val DEV = "DEV"
        const val STAGE = "STAGE"
        const val PROD = "PROD"

        fun getServerUrl(type: String): String {
            return when (type) {
                MOCK -> "https://ya.ru"
//                DEV -> BuildConfig.DEVELOP_URL
//                STAGE -> BuildConfig.STAGE_URL
//                PROD -> BuildConfig.PROD_URL
                else -> throw IllegalStateException("Type '$type' is not defined")
            }
        }
    }
}