#ifndef WIFI_H
#define WIFI_H

// File System Library
#include <FS.h>
// SPI Flash Syetem Library
#include <SPIFFS.h>

#include <WiFi.h>
#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager
#include <ArduinoJson.h>
#include "config.hpp"


extern WiFiManager wm;

// Flag for saving data
extern bool shouldSaveConfig;


void setupWifi(const char *apName, bool resetOnStart);
void saveConfigCallback();
void configModeCallback(WiFiManager *myWiFiManager);
bool loadConfigFile();
void saveConfigFile();


#endif /* WIFI_H */