#include QMK_KEYBOARD_H

enum custom_layers {
    BASE,   // Base 1-9
    COLOR,   // Gaming layer
    EFFECTS, // Function layer
};

enum custom_tapdance {
    TD_7_BLTOG,
    TD_8_BLSTE,
    TD_9_COLOR,
};

//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
  [TD_7_BLTOG] = ACTION_TAP_DANCE_DOUBLE(KC_7, BL_TOGG),
  [TD_8_BLSTE] = ACTION_TAP_DANCE_DOUBLE(KC_8, BL_STEP),
  [TD_9_COLOR] = ACTION_TAP_DANCE_DUAL_ROLE(KC_9, COLOR),
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

/* LAYER 0 */
[BASE] = LAYOUT( \
  TD(TD_7_BLTOG),  TD(TD_8_BLSTE),  TD(TD_9_COLOR),  \
  KC_4,            KC_5,            KC_6,            \
  KC_1,            KC_2,            KC_3             \
),

/* LAYER 1 */
[COLOR] = LAYOUT( \
  RGB_TOG,     RGB_MOD,     TO(EFFECTS), \
  RGB_SAI,     RGB_VAI,     RGB_HUI,     \
  RGB_SAD,     RGB_VAD,     RGB_HUD      \
),

/* LAYER 2 */
[EFFECTS] = LAYOUT( \
  RGB_MODE_PLAIN,     RGB_MODE_BREATHE,  TO(BASE),         \
  RGB_MODE_RAINBOW,   RGB_MODE_SWIRL,    RGB_MODE_SNAKE,   \
  RGB_MODE_KNIGHT,    RGB_MODE_XMAS,     RGB_MODE_RGBTEST  \
)

};

const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
  return MACRO_NONE;
};

void matrix_init_user(void) {
}
