package com.steps.tmuapp.lib;
import android.content.Context;
import android.content.SharedPreferences;
public class PreferenceHelper {
    public static final String PREFERENCE_USER_EMAIL = "UN";
//    public static final String PREFERENCE_Enable_Notification = "ENT";
    public static final String PREFERENCE_NOTIFICATION_TOKEN = "NTFTKN";
    public static final String PREFERENCE_LANGUAGE = "lang";
    public static final String PREFERENCE_FIRBASE_ID ="fcmid";
    private static SharedPreferences settings;
    public static final String PREFERENCE_NOTIFICATION_ASKED = "PREFERENCE_NOTIFICATION_ASKED";

    private static SharedPreferences.Editor editor;

    public PreferenceHelper(Context context){
        settings = context.getSharedPreferences(context.getPackageName(), Context.MODE_PRIVATE);
        editor = settings.edit();
        editor.apply();
    }

    public void setConfig(String key, String value){
        editor.putString(key, value);
        editor.commit();
    }

    public String getConfigString(String key){
        return settings.getString(key, "");
    }

}
