package tooic.fatalityic

import tooic.fatalityic.redic.speckledic.hankeringic.Farawayic
import java.util.Locale

object Runawayic {


    //是否已经点击start
    var ifAgreePrivacy = false
        get() {
            return Farawayic.getInstance().getBoolean("ifAgreePrivacy", field)
        }
        set(value) {
            field = value
            Farawayic.getInstance().put("ifAgreePrivacy", value, true)
        }

    //是否已经走过引导页
    var isGuided
        get() = Farawayic.getInstance().getBoolean("isGuided", false)
        set(value) = Farawayic.getInstance().putBoolean("isGuided", value)


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

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

    //清理过的文件大小
    var cleanedSize = 0L
        get() {
            return Farawayic.getInstance().getLong("cleanedSize", field)
        }
        set(value) {
            field = value
            Farawayic.getInstance().put("cleanedSize", value, true)
        }

    //是否已经评价过
    var isScoreRated = false
        get() {
            return Farawayic.getInstance().getBoolean("isScoreRated", field)
        }
        set(value) {
            field = value
            Farawayic.getInstance().put("isScoreRated", value, true)
        }

    //平均分数
    var scoreRate = 0
        get() {
            return Farawayic.getInstance().getInt("scoreRate", field)
        }
        set(value) {
            field = value
            Farawayic.getInstance().put("scoreRate", value, true)
        }

    //回到主页的次数
    var mainPageCount = 0L
        get() {
            return Farawayic.getInstance().getLong("mainPageCount", field)
        }
        set(value) {
            field = value
            Farawayic.getInstance().put("mainPageCount", value, true)
        }

    //fcm token
    var fcmToken = ""
        get() {
            return Farawayic.getInstance().getString("fcmToken", field)
        }
        set(value) {
            field = value
            Farawayic.getInstance().put("fcmToken", value, true)
        }

}