package com.example.wabi.domain.repository

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

//локальное хранилище
object PrefManager {
    private lateinit var localDataSP: SharedPreferences

    fun initPrefManager(context: Context) {
        localDataSP = context.getSharedPreferences("root", Context.MODE_PRIVATE)
    }

    var onboard: Boolean
        get() = localDataSP.getBoolean("onboard", true)
        set(value) = localDataSP.edit().putBoolean("onboard", value).apply()

    var userTheme: Int
        get() = localDataSP.getInt("userTheme", 0)
        set(value) = localDataSP.edit().putInt("userTheme", value).apply()
}