package ru.myitschool.work.utils

import android.content.Context
import android.content.SharedPreferences

class QrPreferences(context: Context) {
    private val sharedPreferences: SharedPreferences = context.getSharedPreferences(
        PREFS_NAME,
        Context.MODE_PRIVATE
    )

    fun saveQr(login: String) {
        sharedPreferences.edit().apply {
            putString("qr", login)
            apply()
        }
    }

    fun getQr(): String? {
        return sharedPreferences.getString("qr", null)
    }


    companion object {
        private const val PREFS_NAME = "ArPreferences"
    }
}