package com.base.appzxhy

import com.base.appzxhy.utils.AppPreferences
import java.util.Locale

object SpConstObject {

    var ifAgreePrivacy = false
        get() {
            return AppPreferences.getInstance().getBoolean("ifAgreePrivacy", field)
        }
        set(value) {
            field = value
            AppPreferences.getInstance().put("ifAgreePrivacy", value, true)
        }

    var isGuided
        get() = AppPreferences.getInstance().getBoolean("isGuided", false)
        set(value) = AppPreferences.getInstance().putBoolean("isGuided", value)

    var appLanguageSp: String = Locale.getDefault().language
        get() {
            return AppPreferences.getInstance().getString("languageSp", field)
        }
        set(value) {
            field = value
            AppPreferences.getInstance().put("languageSp", value, true)
        }

    var appLanguageCountrySp: String = Locale.getDefault().country
        get() {
            return AppPreferences.getInstance().getString("languageCountrySp", field)
        }
        set(value) {
            field = value
            AppPreferences.getInstance().put("languageCountrySp", value, true)
        }


}