package com.aiosman.ravenow.entity

import android.content.Context
import com.google.gson.annotations.SerializedName

data class ReportReasons(
    @SerializedName("id") var id: Int,
    @SerializedName("text") var text: Map<String, String>
) {
    fun getReasonText(context:Context): String? {
        val language = context.resources.configuration.locale.language
        val langMapping = mapOf(
            "zh" to "zh",
            "en" to "en"
        )
        val useLang = langMapping[language] ?: "en"
        return text[useLang] ?: text["en"]
    }
}