/**
 * @file webui.h
 *
 * @brief Header file for the web-based user interface (WebUI) in the ChainLube application.
 *
 * This file contains declarations for functions related to the initialization and processing of the
 * web-based user interface (WebUI). It includes the necessary libraries and dependencies for handling
 * web server functionality, asynchronous JSON operations, and live debugging through WebSockets.
 *
 * @author Marcel Peterkau
 * @date   09.01.2024
 */

#ifndef _WEBUI_H_
#define _WEBUI_H_

#include <Arduino.h>
#include <FS.h>
#include <LittleFS.h>
#include <ESPAsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <Updater.h>
#include <ESP8266mDNS.h>
#include <AsyncJson.h>
#include <ArduinoJson.h>

#include "config.h"
#include "globals.h"
#include "dtc.h"
#include "common.h"
#include "debugger.h"
#include "struct2json.h"

typedef enum
{
    info,
    success,
    warning,
    error
} NotificationType_t;

void initWebUI();
void Webserver_Process();
void Webserver_Shutdown();

void Websocket_PushLiveDebug(String Message);
void Websocket_PushNotification(String Message, NotificationType_t type);

#endif // _WEBUI_H_
