#pragma once
#include "ApplicationData.h"
#include "ImguiBase.h"

#include <imgui_internal.h>

#define APPLICATION_SETTINGS_GROUP "ApplicationSettings"
#define MAX_TASK_NAME_LENGTH 1024
#define MAX_MAC_ADDRESS_LENGTH 128

void initSettings(DrawData& drawData, ApplicationData& appData);

void* settingsReadOpen(ImGuiContext* ctx, ImGuiSettingsHandler* handler, const char* name);
void settingsReadLine(ImGuiContext* ctx, ImGuiSettingsHandler* handler, void* entry, const char* line);
void settingsWriteAll(ImGuiContext* ctx, ImGuiSettingsHandler* handler, ImGuiTextBuffer* outBuf);

void applySettings(DrawData& drawData, ApplicationData& appData);
void updateDocked(DrawData& drawData, ApplicationData& appData);
void setAutostart(bool newValue);

void loadUiStyle();