/***************************** GPIO HTML Page *********************************
This file is part of the PDI stack.

This is free software. You can redistribute it and/or modify it but without any
warranty.

The `GpioConfigPage.h` file defines the HTML content for various GPIO-related
pages of the web server. These pages allow users to configure GPIO modes, control
GPIO states, monitor GPIO activity, and manage GPIO events. The HTML content is
stored in program memory (PROG_RODT_ATTR) to optimize memory usage on embedded systems.

Author          : Suraj I.
Created Date    : 1st June 2019
******************************************************************************/

#ifndef _EW_GPIO_CONFIG_PAGE_H_
#define _EW_GPIO_CONFIG_PAGE_H_

#include <interface/pdi.h>

/**
 * @brief Titles for GPIO menu options.
 *
 * These strings represent the titles for different GPIO-related menu options
 * displayed on the web server.
 */
static const char WEB_SERVER_GPIO_MENU_TITLE_MODES[] PROG_RODT_ATTR = "gpio modes";
static const char WEB_SERVER_GPIO_MENU_TITLE_CONTROL[] PROG_RODT_ATTR = "gpio control";
static const char WEB_SERVER_GPIO_MENU_TITLE_SERVER[] PROG_RODT_ATTR = "gpio server";
static const char WEB_SERVER_GPIO_MENU_TITLE_MONITOR[] PROG_RODT_ATTR = "gpio monitor";
static const char WEB_SERVER_GPIO_MENU_TITLE_EVENT[] PROG_RODT_ATTR = "gpio events";

/**
 * @brief HTML content for the GPIO monitor page.
 *
 * This static HTML content is used to render the top section of the GPIO monitor
 * page on the web server.
 */
static const char WEB_SERVER_GPIO_MONITOR_PAGE_TOP[] PROG_RODT_ATTR = "\
<h2>GPIO Monitor</h2>\
";

/**
 * @brief SVG element for GPIO monitoring.
 *
 * This SVG element is used to render a graphical representation of GPIO activity
 * on the GPIO monitor page.
 */
static const char WEB_SERVER_GPIO_MONITOR_SVG_ELEMENT[] PROG_RODT_ATTR = "\
<svg id='svga0' width='300' height='150'>\
<rect width='300' height='150'/>\
<line x1='0' y1='25' x2='300' y2='25' stroke='white'></line>\
<line x1='0' y1='125' x2='300' y2='125' stroke='white'></line>\
</svg>\
";

/**
 * @brief HTML content for the GPIO server configuration page.
 *
 * This static HTML content is used to render the top section of the GPIO server
 * configuration page on the web server.
 */
static const char WEB_SERVER_GPIO_SERVER_PAGE_TOP[] PROG_RODT_ATTR = "\
<h2>GPIO Server Configuration</h2>\
<form action='/gpio-server' method='POST'>\
<table>";

/**
 * @brief HTML content for the GPIO mode configuration page.
 *
 * This static HTML content is used to render the top section of the GPIO mode
 * configuration page on the web server.
 */
static const char WEB_SERVER_GPIO_CONFIG_PAGE_TOP[] PROG_RODT_ATTR = "\
<h2>GPIO Mode Configuration</h2>\
<form action='/gpio-config' method='POST'>\
<table>";

/**
 * @brief HTML content for the GPIO control page.
 *
 * This static HTML content is used to render the top section of the GPIO control
 * page on the web server.
 */
static const char WEB_SERVER_GPIO_WRITE_PAGE_TOP[] PROG_RODT_ATTR = "\
<h2>GPIO Control</h2>\
<form action='/gpio-write' method='POST'>\
<table>";

/**
 * @brief HTML content for the GPIO event control page.
 *
 * This static HTML content is used to render the top section of the GPIO event
 * control page on the web server.
 */
static const char WEB_SERVER_GPIO_EVENT_PAGE_TOP[] PROG_RODT_ATTR = "\
<h2>GPIO Event Control</h2>\
<form action='/gpio-event' method='POST'>\
<table>";

/**
 * @brief HTML message for empty GPIO event configuration.
 *
 * This static HTML content is displayed when no GPIO is enabled for event
 * operations. It provides a link to enable GPIO modes.
 */
static const char WEB_SERVER_GPIO_EVENT_EMPTY_MESSAGE[] PROG_RODT_ATTR = "\
<h4>No GPIO enabled for operation.</h4>\
<div>enable from \
<a href='/gpio-config'>\
<button class='btn' type='button'>\
GPIO Modes\
</button>\
</a>\
</div>\
</table>\
</form>\
";

/**
 * @brief HTML message for empty GPIO write configuration.
 *
 * This message reuses the `WEB_SERVER_GPIO_EVENT_EMPTY_MESSAGE` to indicate
 * that no GPIO is enabled for write operations.
 */
static const char *WEB_SERVER_GPIO_WRITE_EMPTY_MESSAGE = WEB_SERVER_GPIO_EVENT_EMPTY_MESSAGE;

#endif
