#ifndef SETTINGS_H
#define SETTINGS_H

#include <nlohmann/json.hpp>
#include <string>

class Settings {

    std::string settings_file_path;
    nlohmann::json settings;

public:
    Settings(std::string path);
    //Immediately saves to a file
    void write_setting(std::string setting, std::string value);
    //Waits for a flush
    void alter_setting(std::string setting, std::string value);
    std::string get_setting(std::string setting);

    void set_settings_file_path(std::string path);
    std::string get_settings_file_path();

    nlohmann::json& get_all_settings();

    void flush();
};

#endif // SETTINGS_H
