package com.adealink.weparty.location.datasource.local

import android.content.Context
import com.adealink.frame.storage.sp.TypeDelegationPrefs
import com.adealink.frame.util.AppUtil
import com.adealink.weparty.module.profile.ProfileModule
import com.adealink.weparty.storage.PREF_LOCATION

object LocationLocalService : TypeDelegationPrefs(
    prefs = {
        AppUtil.appContext.getSharedPreferences(PREF_LOCATION, Context.MODE_PRIVATE)
    },
    userId = {
        ProfileModule.getMyUid()
    }
) {

    var countryCode: String by PrefUserKey("key_country_code", "")

    var nextPermissionRequestTs: Long by PrefUserKey("key_next_permission_request_ts", 0)
}