#ifndef NFC_H
#define NFC_H

#include <PubSubClient.h>
#include <Desfire.h>
#define APDU_BUFFER_SIZE 256

class NFC
{
private:
    MFRC522::Uid uid;
    byte pcb = 0x0A;
    byte cid = 0x00;
    bool cardSelected = false;

public:
    DESFire *rfid;
    NFC(int pin_ss, int pin_rst);
    bool testNFC();
    bool checkforCard();
    bool connecttoCard();
    bool disconnectCard();
    bool testCard();
    bool hasCardSelected();
    MFRC522::Uid getUID();

    MFRC522::StatusCode Transceive(byte *command, byte command_len, byte *response, byte *response_len);
};

#endif
