package com.adealink.weparty.storage

import android.content.Context
import com.adealink.frame.storage.sp.TypeDelegationPrefs
import com.adealink.frame.util.AppUtil

object AppPref: TypeDelegationPrefs(
    prefs = {
        AppUtil.appContext.getSharedPreferences(PREF_APP, Context.MODE_PRIVATE)
    }
) {
    var uid: String by PrefKey("key_uid", "")
    var token: String by PrefKey("key_token", "")
    var refreshToken: String by PrefKey("key_refresh_token", "")
    var isLogin: Boolean by PrefKey("key_is_login", false)
    var deviceLogined: Boolean by PrefKey("key_device_logined", false)
    var languageCode: String by PrefKey("key_language_code", "")
    var languageCountry: String by PrefKey("key_language_country", "")
    var languageVariant: String by PrefKey("key_language_variant", "")
    var userInfo: String by PrefKey("key_user_info", "")
    var startFlexUpdateTime: Long by PrefKey("key_start_flex_update_time", 0)
    var imToken: String by PrefKey("imToken", "")
}