#pragma once

// This file is not used by the runtime, instead, a version is generated during
// compilation with only the relevant feature flags for the current build.
//
// This file is only used by static analyzers and IDEs.

#include "esphome/core/macros.h"

// Informative flags
#define ESPHOME_BOARD "dummy_board"
#define ESPHOME_PROJECT_NAME "dummy project"
#define ESPHOME_PROJECT_VERSION "v2"
#define ESPHOME_PROJECT_VERSION_30 "v2"
#define ESPHOME_VARIANT "ESP32"
#define ESPHOME_NAME_ADD_MAC_SUFFIX
#define ESPHOME_DEBUG_SCHEDULER
#define ESPHOME_DEBUG_API

// Threading model for static analysis. Match what the real codegen picks per
// platform (see esphome/components/<platform>/__init__.py ThreadModel.*):
//   USE_ESP8266 / USE_RP2040 / USE_NRF52 → SINGLE
//   USE_BK72XX (ARMv5TE, no LDREX/STREX) → MULTI_NO_ATOMICS
//   everything else (ESP32, host, RTL87XX, LN882X) → MULTI_ATOMICS
// Without this the clang-tidy envs end up with USE_<single-threaded platform>
// + MULTI_ATOMICS simultaneously, a combination that can never occur in a
// real build.
#if defined(USE_ESP8266) || defined(USE_RP2040) || defined(USE_NRF52)
#define ESPHOME_THREAD_SINGLE
#elif defined(USE_BK72XX)
#define ESPHOME_THREAD_MULTI_NO_ATOMICS
#else
#define ESPHOME_THREAD_MULTI_ATOMICS
#endif

// logger
#define ESPHOME_LOG_LEVEL ESPHOME_LOG_LEVEL_VERY_VERBOSE
#define ESPHOME_LOGGER_TX_BUFFER_SIZE 512
#define USE_LOG_LISTENERS
#define ESPHOME_LOG_MAX_LISTENERS 8

// Feature flags
#define USE_ALARM_CONTROL_PANEL
#define USE_AREAS
#define USE_BINARY_SENSOR
#define USE_BINARY_SENSOR_FILTER
#define USE_BUTTON
#define USE_CAMERA
#define USE_CLIMATE
#define USE_CLIMATE_VISUAL_OVERRIDES
#define USE_CONTROLLER_REGISTRY
#define USE_COVER
#define USE_DATETIME
#define USE_DATETIME_DATE
#define USE_DATETIME_DATETIME
#define USE_DATETIME_TIME
#define USE_DEBUG
#define USE_DEEP_SLEEP
#define USE_DEVICES
#define USE_DISPLAY
#define USE_ENTITY_DEVICE_CLASS
#define USE_ENTITY_ICON
#define USE_ENTITY_UNIT_OF_MEASUREMENT
#define USE_ESP32_BLE_PSRAM
#define USE_ESP32_CAMERA_JPEG_CONVERSION
#define USE_ESP32_HOSTED
#define USE_ESP32_IMPROV_STATE_CALLBACK
#define USE_EVENT
#define USE_FAN
#define USE_GPIO_SWITCH_INTERLOCK
#define USE_GRAPH
#define USE_GRAPHICAL_DISPLAY_MENU
#define USE_HOMEASSISTANT_TIME
#define USE_HTTP_REQUEST_OTA_WATCHDOG_TIMEOUT 8000  // NOLINT
#define USE_I2S_AUDIO_SPDIF_MODE
#define USE_IMAGE
#define USE_IMPROV_SERIAL
#define USE_IMPROV_SERIAL_NEXT_URL
#define USE_INFRARED
#define USE_IR_RF
#define USE_JSON
#define USE_RADIO_FREQUENCY
#define USE_LIGHT
#define USE_LIGHT_GAMMA_LUT
#define USE_LOCK
#define USE_LOGGER
#define USE_LOGGER_LEVEL_LISTENERS
#define USE_LOGGER_RUNTIME_TAG_LEVELS
#define USE_LVGL
#define USE_LVGL_ANIMIMG
#define USE_LVGL_ARC
#define USE_LVGL_BINARY_SENSOR
#define USE_LVGL_BUTTON
#define USE_LVGL_BUTTONMATRIX
#define USE_LVGL_CANVAS
#define USE_LVGL_CHART
#define USE_LVGL_CHECKBOX
#define USE_LVGL_DROPDOWN
#define USE_LVGL_FONT
#define USE_LVGL_GRADIENT
#define USE_LVGL_IMAGE
#define USE_LVGL_IMAGEBUTTON
#define USE_LVGL_KEY_LISTENER
#define USE_LVGL_KEYBOARD
#define USE_LVGL_LABEL
#define USE_LVGL_LINE
#define USE_LVGL_LIST
#define USE_LVGL_MENU
#define USE_LVGL_METER
#define USE_LVGL_MSGBOX
#define USE_LVGL_ROLLER
#define USE_LVGL_ROTARY_ENCODER
#define USE_LVGL_SCALE
#define USE_LVGL_SLIDER
#define USE_LVGL_SPAN
#define USE_LVGL_SPINBOX
#define USE_LVGL_SPINNER
#define USE_LVGL_SWITCH
#define USE_LVGL_TABLE
#define USE_LVGL_TABVIEW
#define USE_LVGL_TEXTAREA
#define USE_LVGL_TILEVIEW
#define USE_LVGL_TOUCHSCREEN
#define USE_MDNS
#define USE_MDNS_STORE_SERVICES
#define MDNS_SERVICE_COUNT 3
#define USE_MDNS_DYNAMIC_TXT
#define MDNS_DYNAMIC_TXT_COUNT 2
#define MICRONOVA_LISTENER_COUNT 1
#define USE_MICRONOVA_WRITER
#define SERIAL_PROXY_COUNT 2
#define SNTP_SERVER_COUNT 3
#define USE_MEDIA_PLAYER
#define USE_MEDIA_SOURCE
#define USE_NEXTION_COMMAND_SPACING
#define USE_NEXTION_CONF_START_UP_PAGE
#define USE_NEXTION_CONFIG_DUMP_DEVICE_INFO
#define USE_NEXTION_CONFIG_EXIT_REPARSE_ON_START
#define USE_NEXTION_CONFIG_SKIP_CONNECTION_HANDSHAKE
#define USE_NEXTION_MAX_COMMANDS_PER_LOOP
#define USE_NEXTION_MAX_QUEUE_SIZE
#define USE_NEXTION_TFT_UPLOAD
#define USE_NEXTION_TRIGGER_CUSTOM_BINARY_SENSOR
#define USE_NEXTION_TRIGGER_CUSTOM_SENSOR
#define USE_NEXTION_TRIGGER_CUSTOM_SWITCH
#define USE_NEXTION_TRIGGER_CUSTOM_TEXT_SENSOR
#define USE_NEXTION_WAVEFORM
#define USE_NUMBER
#define USE_OUTPUT
#define USE_OUTPUT_FLOAT_POWER_SCALING
#define USE_POWER_SUPPLY
#define USE_PREFERENCES_SYNC_EVERY_LOOP
#define USE_QR_CODE
#define USE_SAFE_MODE_CALLBACK
#define ESPHOME_SAFE_MODE_CALLBACK_COUNT 1
#define USE_SELECT
#define USE_SENSOR
#define USE_SENSOR_FILTER
#define USE_SERIAL_PROXY
#define USE_SETUP_PRIORITY_OVERRIDE
#define USE_STATUS_LED
#define USE_STATUS_SENSOR
#define USE_SWITCH
#define USE_TEXT
#define USE_TEXT_SENSOR
#define USE_TEXT_SENSOR_FILTER
#define USE_TIME
#define USE_TOUCHSCREEN
#define USE_UART_DEBUGGER
#define USE_UART_WAKE_LOOP_ON_RX
#define USE_UPDATE
#define USE_VALVE
#define USE_WATER_HEATER
#define USE_WATER_HEATER_VISUAL_OVERRIDES
#define USE_ZWAVE_PROXY

// Feature flags which do not work for zephyr
#ifndef USE_ZEPHYR
#define AUDIO_FILE_MAX_FILES 4
#define USE_AUDIO_DAC
#define USE_AUDIO_FLAC_SUPPORT
#define USE_AUDIO_MP3_SUPPORT
#define USE_AUDIO_OPUS_SUPPORT
#define USE_AUDIO_WAV_SUPPORT
#define USE_API
#define USE_API_CLIENT_CONNECTED_TRIGGER
#define USE_API_CLIENT_DISCONNECTED_TRIGGER
#define USE_API_HOMEASSISTANT_ACTION_RESPONSES
#define USE_API_HOMEASSISTANT_ACTION_RESPONSES_JSON
#define USE_API_HOMEASSISTANT_SERVICES
#define USE_API_HOMEASSISTANT_STATES
#define USE_API_NOISE
#define USE_API_VARINT64
#define USE_API_PLAINTEXT
#define USE_API_USER_DEFINED_ACTIONS
#define USE_API_CUSTOM_SERVICES
#define USE_API_USER_DEFINED_ACTION_RESPONSES
#define USE_API_USER_DEFINED_ACTION_RESPONSES_JSON
#define API_MAX_SEND_QUEUE 8
#define MAX_API_CONNECTIONS 6
#define USE_MD5
#define USE_SHA256
#define USE_MQTT
#define USE_MQTT_COVER_JSON
#define USE_NETWORK
#define USE_RTTTL_FINISHED_PLAYBACK_CALLBACK
#define USE_RUNTIME_IMAGE_BMP
#define USE_RUNTIME_IMAGE_PNG
#define USE_RUNTIME_IMAGE_JPEG
#define USE_RUNTIME_STATS
#define USE_OTA
#define USE_OTA_PASSWORD
#define USE_OTA_STATE_LISTENER
#define USE_OTA_VERSION 2
#define USE_TIME_TIMEZONE
#define USE_WIFI
#define USE_WIFI_AP
#define USE_WIFI_MANUAL_IP
#define USE_WIREGUARD
#endif

// Arduino-specific feature flags
#ifdef USE_ARDUINO
#define USE_PROMETHEUS
#define USE_WIFI_WPA2_EAP
#endif

// Platforms with native 64-bit time sources (no rollover tracking needed)
#if defined(USE_ESP32) || defined(USE_HOST) || defined(USE_ZEPHYR) || defined(USE_RP2040)
#define USE_NATIVE_64BIT_TIME
#endif

// ESP32-specific feature flags
#ifdef USE_ESP32
#define USE_ESP32_CRASH_HANDLER
#define USE_MQTT_IDF_ENQUEUE
#define USE_ESPHOME_TASK_LOG_BUFFER
#define ESPHOME_TASK_LOG_BUFFER_SIZE 768
#define USE_OTA_ROLLBACK
#define USE_OTA_SIGNED_VERIFICATION
#define USE_ESP32_MIN_CHIP_REVISION_SET
#define USE_ESP32_SRAM1_AS_IRAM

#define USE_BLUETOOTH_PROXY
#define BLUETOOTH_PROXY_MAX_CONNECTIONS 3
#define BLUETOOTH_PROXY_ADVERTISEMENT_BATCH_SIZE 16
#define USE_CAPTIVE_PORTAL
#define USE_ESP32_BLE
#define USE_ESP32_BLE_MAX_CONNECTIONS 3
#define USE_ESP32_BLE_CLIENT
#define USE_ESP32_BLE_DEVICE
#define USE_ESP32_BLE_SERVER
#define USE_ESP32_BLE_UUID
#define USE_ESP32_BLE_ADVERTISING
#define USE_ESP32_BLE_SERVER_SET_VALUE_ACTION
#define USE_ESP32_BLE_SERVER_DESCRIPTOR_SET_VALUE_ACTION
#define USE_ESP32_BLE_SERVER_NOTIFY_ACTION
#define USE_ESP32_BLE_SERVER_CHARACTERISTIC_ON_WRITE
#define USE_ESP32_BLE_SERVER_DESCRIPTOR_ON_WRITE
#define USE_ESP32_BLE_SERVER_ON_CONNECT
#define USE_ESP32_BLE_SERVER_ON_DISCONNECT
#define ESPHOME_ESP32_BLE_TRACKER_LISTENER_COUNT 1
#define ESPHOME_ESP32_BLE_TRACKER_CLIENT_COUNT 1
#define ESPHOME_ESP32_BLE_GAP_EVENT_HANDLER_COUNT 2
#define ESPHOME_ESP32_BLE_GAP_SCAN_EVENT_HANDLER_COUNT 1
#define ESPHOME_ESP32_BLE_GATTC_EVENT_HANDLER_COUNT 1
#define ESPHOME_ESP32_BLE_GATTS_EVENT_HANDLER_COUNT 1
#define ESPHOME_ESP32_BLE_BLE_STATUS_EVENT_HANDLER_COUNT 2
#define ESPHOME_ESP32_BLE_EXTENDED_AUTH_PARAMS
#define ESPHOME_LOOP_TASK_STACK_SIZE 8192
#define USE_ESP32_CAMERA_JPEG_ENCODER
#define USE_HTTP_REQUEST_RESPONSE
#define USE_I2C
#define USE_IMPROV
#define USE_ESP32_IMPROV_NEXT_URL
#define USE_MICROPHONE
#define USE_PSRAM
#define USE_SENDSPIN
#define USE_SENDSPIN_ARTWORK
#define USE_SENDSPIN_CONTROLLER
#define USE_SENDSPIN_METADATA
#define USE_SENDSPIN_PLAYER
#define USE_SENDSPIN_VISUALIZER
#define USE_SENDSPIN_PORT 8928  // NOLINT
#define USE_SOCKET_IMPL_BSD_SOCKETS
#define USE_LWIP_FAST_SELECT

#define USE_SPEAKER
#define USE_SPEAKER_MEDIA_PLAYER_ON_OFF
#define USE_SPI
#define USE_VOICE_ASSISTANT
#define USE_WEBSERVER
#define USE_WEBSERVER_AUTH
#define USE_WEBSERVER_OTA
#define USE_WEBSERVER_PORT 80  // NOLINT
#define USE_WEBSERVER_GZIP
#define USE_WEBSERVER_SORTING
#define WEB_SERVER_DEFAULT_HEADERS_COUNT 1
#define USE_CAPTIVE_PORTAL_GZIP
#define USE_WIFI_11KV_SUPPORT
#define USE_WIFI_FAST_CONNECT
#define USE_WIFI_PHY_MODE
#define USE_WIFI_IP_STATE_LISTENERS
#define USE_WIFI_SCAN_RESULTS_LISTENERS
#define USE_WIFI_CONNECT_STATE_LISTENERS
#define USE_WIFI_POWER_SAVE_LISTENERS
#define USE_WIFI_CONNECT_TRIGGER
#define USE_WIFI_DISCONNECT_TRIGGER
#define ESPHOME_WIFI_IP_STATE_LISTENERS 2
#define ESPHOME_WIFI_SCAN_RESULTS_LISTENERS 2
#define ESPHOME_WIFI_CONNECT_STATE_LISTENERS 2
#define ESPHOME_WIFI_POWER_SAVE_LISTENERS 2
#define USE_WIFI_RUNTIME_POWER_SAVE
#define USB_HOST_MAX_REQUESTS 16
#define USB_UART_OUTPUT_CHUNK_COUNT 5

#ifdef USE_ARDUINO
#define USE_ARDUINO_VERSION_CODE VERSION_CODE(3, 3, 7)
#define USE_ETHERNET
#define USE_ETHERNET_LAN8720
#define USE_ETHERNET_RTL8201
#define USE_ETHERNET_DP83848
#define USE_ETHERNET_IP101
#define USE_ETHERNET_JL1101
#define USE_ETHERNET_KSZ8081
#define USE_ETHERNET_LAN8670
#define USE_ETHERNET_SPI
#define USE_ETHERNET_SPI_POLLING_SUPPORT
#define USE_ETHERNET_OPENETH
#define USE_ETHERNET_W5100
#define USE_ETHERNET_W5500
#define USE_ETHERNET_W6100
#define USE_ETHERNET_W6300
#define USE_ETHERNET_DM9051
#define CONFIG_ETH_SPI_ETHERNET_W5500 1
#define CONFIG_ETH_SPI_ETHERNET_DM9051 1
#define CONFIG_ETH_USE_ESP32_EMAC 1
#define USE_ETHERNET_MANUAL_IP
#define USE_ETHERNET_IP_STATE_LISTENERS
#define USE_ETHERNET_CONNECT_TRIGGER
#define USE_ETHERNET_DISCONNECT_TRIGGER
#define ESPHOME_ETHERNET_IP_STATE_LISTENERS 2
#endif

#ifdef USE_ESP32
#define USE_MICRO_WAKE_WORD
#define USE_MICRO_WAKE_WORD_VAD
#if defined(USE_ESP32_VARIANT_ESP32C6) || defined(USE_ESP32_VARIANT_ESP32H2)
#define USE_OPENTHREAD
#define USE_ZIGBEE
#endif
#endif

#if defined(USE_ESP32_VARIANT_ESP32S2)
#define USE_LOGGER_USB_CDC
#define USE_LOGGER_UART_SELECTION_USB_CDC
#elif defined(USE_ESP32_VARIANT_ESP32C3) || defined(USE_ESP32_VARIANT_ESP32C5) || \
    defined(USE_ESP32_VARIANT_ESP32C6) || defined(USE_ESP32_VARIANT_ESP32C61) || defined(USE_ESP32_VARIANT_ESP32H2) || \
    defined(USE_ESP32_VARIANT_ESP32P4) || defined(USE_ESP32_VARIANT_ESP32S3)
#define USE_LOGGER_USB_CDC
#define USE_LOGGER_UART_SELECTION_USB_CDC
#define USE_LOGGER_USB_SERIAL_JTAG
#endif
#endif

// ESP8266-specific feature flags
#ifdef USE_ESP8266
#define USE_ADC_SENSOR_VCC
#define USE_ESP8266_CRASH_HANDLER
#define USE_ARDUINO_VERSION_CODE VERSION_CODE(3, 1, 2)
#define USE_CAPTIVE_PORTAL
#define USE_ESP8266_LOGGER_SERIAL
#define USE_ESP8266_LOGGER_SERIAL1
#define USE_ESP8266_PREFERENCES_FLASH
#define USE_ESP8266_UART_SERIAL
#define USE_ESP8266_UART_SERIAL1
#define USE_HTTP_REQUEST_ESP8266_HTTPS
#define USE_HTTP_REQUEST_RESPONSE
#define USE_I2C
#define USE_SOCKET_IMPL_LWIP_TCP

#define USE_SPI

// Dummy firmware payload for shelly_dimmer
#define USE_SHD_FIRMWARE_MAJOR_VERSION 56
#define USE_SHD_FIRMWARE_MINOR_VERSION 5
// clang-format off
#define USE_SHD_FIRMWARE_DATA \
  {}
// clang-format on

#define USE_WEBSERVER
#define USE_WEBSERVER_AUTH
#define USE_WEBSERVER_PORT 80  // NOLINT
#endif

#ifdef USE_RP2040
#define USE_ARDUINO_VERSION_CODE VERSION_CODE(3, 3, 0)
#define USE_RP2040_CRASH_HANDLER
#define USE_HTTP_REQUEST_RESPONSE
#define USE_I2C
#define USE_LOGGER_USB_CDC
#define USE_SOCKET_IMPL_LWIP_TCP
#define USE_RP2040_BLE
#define USE_SPI
#ifndef USE_ETHERNET
#define USE_ETHERNET
#endif
#ifndef USE_ETHERNET_SPI
#define USE_ETHERNET_SPI
#endif
#endif

#ifdef USE_LIBRETINY
#define USE_CAPTIVE_PORTAL
#define USE_SOCKET_IMPL_LWIP_SOCKETS
#define USE_LWIP_FAST_SELECT
#define USE_WEBSERVER
#define USE_WEBSERVER_AUTH
#define USE_WEBSERVER_PORT 80  // NOLINT
#define USE_ESPHOME_TASK_LOG_BUFFER
#define ESPHOME_TASK_LOG_BUFFER_SIZE 768
#endif

#ifdef USE_HOST
#define USE_HTTP_REQUEST_RESPONSE
#define USE_SOCKET_IMPL_BSD_SOCKETS
#define USE_ESPHOME_TASK_LOG_BUFFER
#define ESPHOME_TASK_LOG_BUFFER_SIZE 64
#endif

#ifdef USE_NRF52
#define ESPHOME_BLE_NUS_TX_RING_BUFFER_SIZE 512
#define ESPHOME_BLE_NUS_RX_RING_BUFFER_SIZE 512
#define USE_ESPHOME_TASK_LOG_BUFFER
#define ESPHOME_TASK_LOG_BUFFER_SIZE 768
#define USE_LOGGER_EARLY_MESSAGE
#define USE_LOGGER_UART_SELECTION_USB_CDC
#define USE_LOGGER_USB_CDC
#define USE_LOGGER_WAIT_FOR_CDC
#define USE_NRF52_DFU
#define USE_NRF52_REG0_VOUT 5
#define USE_NRF52_UICR_ERASE
#define USE_OTA_ROLLBACK
#define USE_SOFTDEVICE_ID 7
#define USE_SOFTDEVICE_VERSION 1
#define USE_ZIGBEE
#define USE_ZIGBEE_WIPE_ON_BOOT
#define USE_ZIGBEE_WIPE_ON_BOOT_MAGIC 1
#define ZIGBEE_ENDPOINTS_COUNT 8
#endif

// Disabled feature flags
// #define USE_BSEC   // Requires a library with proprietary license
// #define USE_BSEC2  // Requires a library with proprietary license

#define USE_DASHBOARD_IMPORT

// Default counts for static analysis
#define CONTROLLER_REGISTRY_MAX 2
#define ESPHOME_AREA_COUNT 10
#define ESPHOME_COMPONENT_COUNT 50
#define ESPHOME_DEVICE_COUNT 10
#define ESPHOME_ENTITY_ALARM_CONTROL_PANEL_COUNT 1
#define ESPHOME_ENTITY_BINARY_SENSOR_COUNT 1
#define ESPHOME_ENTITY_BUTTON_COUNT 1
#define ESPHOME_ENTITY_CLIMATE_COUNT 1
#define ESPHOME_ENTITY_COVER_COUNT 1
#define ESPHOME_ENTITY_DATE_COUNT 1
#define ESPHOME_ENTITY_DATETIME_COUNT 1
#define ESPHOME_ENTITY_EVENT_COUNT 1
#define ESPHOME_ENTITY_FAN_COUNT 1
#define ESPHOME_ENTITY_INFRARED_COUNT 1
#define ESPHOME_ENTITY_LIGHT_COUNT 1
#define ESPHOME_ENTITY_LOCK_COUNT 1
#define ESPHOME_ENTITY_MEDIA_PLAYER_COUNT 1
#define ESPHOME_ENTITY_NUMBER_COUNT 1
#define ESPHOME_ENTITY_RADIO_FREQUENCY_COUNT 1
#define ESPHOME_ENTITY_SELECT_COUNT 1
#define ESPHOME_ENTITY_SENSOR_COUNT 1
#define ESPHOME_ENTITY_SWITCH_COUNT 1
#define ESPHOME_ENTITY_TEXT_COUNT 1
#define ESPHOME_ENTITY_TEXT_SENSOR_COUNT 1
#define ESPHOME_ENTITY_TIME_COUNT 1
#define ESPHOME_ENTITY_UPDATE_COUNT 1
#define ESPHOME_ENTITY_VALVE_COUNT 1
#define ESPHOME_ENTITY_WATER_HEATER_COUNT 1
#define ESPHOME_MAX_USB_CDC_INSTANCES 1
