package com.base.scanqr.bean

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

object ConstObject {
    var mainStartTimes = 0
        get() {
            return AppPreferences.getInstance().getInt("mainStartTimes", field)
        }
        set(value) {
            field = value
            AppPreferences.getInstance().put("mainStartTimes", value, true)
        }


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

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


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

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