#ifndef DECL_COMMON_SETTING
#   define  DECL_COMMON_SETTING(type, name, defaultValue, shortDesc, longDesc, outputStmt, parse, buildWidget)
#endif

#ifndef DECL_SERVER_ONLY_SETTING
#   define  DECL_SERVER_ONLY_SETTING(...) DECL_COMMON_SETTING(__VA_ARGS__)
#endif

#ifndef DECL_CLIENT_ONLY_SETTING
#   define DECL_CLIENT_ONLY_SETTING(...) DECL_COMMON_SETTING(__VA_ARGS__)
#endif

#ifndef HIDDEN_SETTINGS
#   define HIDDEN_SETTINGS(...) __VA_ARGS__
#endif

#ifndef SETTINGS_SECTION
#   define SETTINGS_SECTION(icon, label, body) body
#endif

#define PARSE_INTEGER {SETTING_VALUE = std::stoi(value); return "";}
#define PARSE_BOOL(truestr, falsestr) \
    if (value == truestr) SETTING_VALUE = true;\
    else if (value == falsestr) SETTING_VALUE = false;\
    else return formatString("Setting `$+` must be `$+` or `$+`", key, truestr, falsestr);\
    return "";

#include <Settings/GraphicsSettings.hpp>
#include <Settings/AudioSettings.hpp>
#include <Settings/MiscSettings.hpp>

#include <Settings/ServerOnlySettings.hpp>
#include <Settings/HiddenSettings.hpp>

#undef HIDDEN_SETTINGS
#undef SETTINGS_SECTION
#undef DECL_SERVER_ONLY_SETTING
#undef DECL_CLIENT_ONLY_SETTING
#undef DECL_COMMON_SETTING
#undef PARSE_INTEGER
#undef PARSE_BOOL