#ifndef capturePoint_h
#define capturePoint_h

#include <Arduino.h>
#include <ArduinoJson.h>

class capturePoint {
  private:
    char* _name;
    int _btnPin;
    bool _isHeld;
    bool _inCapture;
    bool _inContention;
    uint32_t _accumulatedPoints;
    int _captureStrength;
    int _maxCaptureStrength;
    int _captureModifier;

    JsonDocument _jsonStatus;

  public:
    capturePoint(char* name, int pin);
    String getName();
    bool isHeld();
    bool isHeld(bool);
    void capture(int modifier = 1);   // User presses THIS button.
    void contest(int modifier = 1);   // User presses OTHER button
    long addPoints(int modifier = 1);   //Interval timer to increment when (isHeld == true)
    String getPoints();                   // Return how much time has been captured (points held?)
    String getStrength();



    JsonDocument jsonStatus();        // Json data to send to LoRaWAN

};
#endif