#pragma once

// Copy this file to include/l484_door_config.h and fill in local values.

#define WIFI_SSID "your-wifi"
#define WIFI_PASSWORD "your-wifi-password"

// Use the on-prem L484 backend reachable from the ESP32 LAN.
#define L484_ACCESS_URL "http://192.168.1.10:2354/api/access/check"
#define L484_CONTROLLER_TOKEN "replace-with-ACCESS_CONTROLLER_TOKEN"
#define L484_DOOR_ID "front-door"

// PN532 I2C pins on a typical ESP32 dev board.
#define PN532_SDA_PIN 21
#define PN532_SCL_PIN 22
#define PN532_IRQ_PIN 4
#define PN532_RESET_PIN 5

// Card credential modes:
// 1 = submit UID hex. Good for bench testing only.
// 2 = read a MIFARE Classic block and submit the secret stored there.
#define CARD_MODE_UID 1
#define CARD_MODE_MIFARE_CLASSIC_BLOCK 2
#define CARD_MODE CARD_MODE_UID

// MIFARE Classic settings used when CARD_MODE is CARD_MODE_MIFARE_CLASSIC_BLOCK.
#define MIFARE_SECRET_BLOCK 4
static const uint8_t MIFARE_KEY_A[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };

// Backend request timeout. Fail closed if the API does not answer.
#define ACCESS_TIMEOUT_MS 2500

// Avoid duplicate reads while a card is held on the reader.
#define READ_COOLDOWN_MS 1800
