package com.shukria.softpos;

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

public class AppSettings {

    private static final String PREFS_NAME = "softpos_settings";
    private static final String KEY_DEBUG_MODE = "pref_debug_mode";

    private final SharedPreferences prefs;

    public AppSettings(Context context) {
        prefs = context.getApplicationContext()
                .getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);
    }

    public boolean isDebugMode() {
        return prefs.getBoolean(KEY_DEBUG_MODE, false);
    }

    public void setDebugMode(boolean enabled) {
        prefs.edit().putBoolean(KEY_DEBUG_MODE, enabled).apply();
    }
}
