#ifndef BUTTONSH
#define BUTTONSH

#include "Arduino.h"
#include <vector>
#include "JC_Button.h"
#include "board.h"
#include "led.h"

class c_button : public ToggleButton
{
  const e_ledcolor _color;
  const uint8_t _index;

public:
  c_button(uint8_t pin, e_ledcolor color, uint8_t index) 
    : ToggleButton(pin), _color(color), _index(index) {}
  
  e_ledcolor getColor( void ){return _color;}
  uint8_t getIndex( void ) {return _index;}

};

bool anybutton(void);
void initButtons(void);
void handleButtons(void);
c_button *getButton(unsigned int index);
c_button *getButton(e_ledcolor index);

std::vector<c_button *>* getButtonlist(void);

bool buttonIsPressed(e_ledcolor index);
bool buttonIsPressed(uint16_t index);
bool buttonWasPressed(e_ledcolor index);


#endif //BUTTONSH