// LED ring states. Runs on its own FreeRTOS task so animation never stalls while HTTPS blocks.
#pragma once
#include <Arduino.h>

enum LedState : uint8_t {
  LED_OFF, LED_BOOT, LED_PORTAL, LED_CONNECTING, LED_IDLE, LED_SENDING,
  LED_OK, LED_COOLDOWN, LED_INSUFFICIENT, LED_ERROR, LED_OFFLINE, LED_RESET_WARN,
};

namespace led {
  void begin();
  void set(LedState s, uint32_t durationMs = 0);   // durationMs: for COOLDOWN, how long the drain takes
  void settle(LedState s, uint32_t holdMs, LedState after); // show s, then fall back to `after`
  LedState current();
}
