package com.seven.ikar.kotlin.core.push

import android.content.Context

class InitialCallPermissionPromptStore(context: Context) {
    private val preferences = context.getSharedPreferences(PreferencesName, Context.MODE_PRIVATE)

    fun wasPrompted(): Boolean = preferences.getBoolean(WasPromptedKey, false)

    fun markPrompted() {
        preferences.edit().putBoolean(WasPromptedKey, true).apply()
    }

    private companion object {
        const val PreferencesName = "ikar_kotlin_initial_call_permission_prompt"
        const val WasPromptedKey = "wasPrompted"
    }
}
