local TXUI, F, E, I, V, P, G = unpack((select(2, ...)))

-- Spec IDs organized by class
-- Usage: I.Specs.Warrior.Protection, I.Specs.Mage.Arcane, etc.
I.Specs = {
  DeathKnight = {
    Blood = 250,
    Frost = 251,
    Unholy = 252,
  },
  DemonHunter = {
    Havoc = 577,
    Vengeance = 581,
    Devourer = 1480,
  },
  Druid = {
    Balance = 102,
    Feral = 103,
    Guardian = 104,
    Restoration = 105,
  },
  Evoker = {
    Devastation = 1467,
    Preservation = 1468,
    Augmentation = 1473,
  },
  Hunter = {
    BeastMastery = 253,
    Marksmanship = 254,
    Survival = 255,
  },
  Mage = {
    Arcane = 62,
    Fire = 63,
    Frost = 64,
  },
  Monk = {
    Brewmaster = 268,
    Mistweaver = 270,
    Windwalker = 269,
  },
  Paladin = {
    Holy = 65,
    Protection = 66,
    Retribution = 70,
  },
  Priest = {
    Discipline = 256,
    Holy = 257,
    Shadow = 258,
  },
  Rogue = {
    Assassination = 259,
    Outlaw = 260,
    Subtlety = 261,
  },
  Shaman = {
    Elemental = 262,
    Enhancement = 263,
    Restoration = 264,
  },
  Warlock = {
    Affliction = 265,
    Demonology = 266,
    Destruction = 267,
  },
  Warrior = {
    Arms = 71,
    Fury = 72,
    Protection = 73,
  },
}

-- Classes available in MoP Classic and above, but not in vanilla (ClassicEra/Anniversary)
I.ClassicPlusClasses = {
  DEATHKNIGHT = true,
  MONK = true,
}

-- Classes that only exist in Retail
I.RetailOnlyClasses = {
  DEMONHUNTER = true,
  EVOKER = true,
}

function I.IsClassAvailable(class)
  if I.RetailOnlyClasses[class] then return TXUI.IsRetail end
  if I.ClassicPlusClasses[class] then return TXUI.IsRetail or TXUI.IsClassic end
  return true
end

-- Ordered list of class tokens (alphabetical)
I.ClassOrder = {
  "DEATHKNIGHT",
  "DEMONHUNTER",
  "DRUID",
  "EVOKER",
  "HUNTER",
  "MAGE",
  "MONK",
  "PALADIN",
  "PRIEST",
  "ROGUE",
  "SHAMAN",
  "WARLOCK",
  "WARRIOR",
}

-- Ordered spec IDs per class token
I.ClassSpecOrder = {
  DEATHKNIGHT = { I.Specs.DeathKnight.Blood, I.Specs.DeathKnight.Frost, I.Specs.DeathKnight.Unholy },
  DEMONHUNTER = { I.Specs.DemonHunter.Havoc, I.Specs.DemonHunter.Vengeance, I.Specs.DemonHunter.Devourer },
  DRUID = { I.Specs.Druid.Balance, I.Specs.Druid.Feral, I.Specs.Druid.Guardian, I.Specs.Druid.Restoration },
  EVOKER = { I.Specs.Evoker.Devastation, I.Specs.Evoker.Preservation, I.Specs.Evoker.Augmentation },
  HUNTER = { I.Specs.Hunter.BeastMastery, I.Specs.Hunter.Marksmanship, I.Specs.Hunter.Survival },
  MAGE = { I.Specs.Mage.Arcane, I.Specs.Mage.Fire, I.Specs.Mage.Frost },
  MONK = { I.Specs.Monk.Brewmaster, I.Specs.Monk.Mistweaver, I.Specs.Monk.Windwalker },
  PALADIN = { I.Specs.Paladin.Holy, I.Specs.Paladin.Protection, I.Specs.Paladin.Retribution },
  PRIEST = { I.Specs.Priest.Discipline, I.Specs.Priest.Holy, I.Specs.Priest.Shadow },
  ROGUE = { I.Specs.Rogue.Assassination, I.Specs.Rogue.Outlaw, I.Specs.Rogue.Subtlety },
  SHAMAN = { I.Specs.Shaman.Elemental, I.Specs.Shaman.Enhancement, I.Specs.Shaman.Restoration },
  WARLOCK = { I.Specs.Warlock.Affliction, I.Specs.Warlock.Demonology, I.Specs.Warlock.Destruction },
  WARRIOR = { I.Specs.Warrior.Arms, I.Specs.Warrior.Fury, I.Specs.Warrior.Protection },
}

-- Class token to English display name mapping
-- Usage: I.EnglishClassName["DEATHKNIGHT"] -> "Death Knight"
I.EnglishClassName = {
  DEATHKNIGHT = "Death Knight",
  DEMONHUNTER = "Demon Hunter",
  DRUID = "Druid",
  EVOKER = "Evoker",
  HUNTER = "Hunter",
  MAGE = "Mage",
  MONK = "Monk",
  PALADIN = "Paladin",
  PRIEST = "Priest",
  ROGUE = "Rogue",
  SHAMAN = "Shaman",
  WARLOCK = "Warlock",
  WARRIOR = "Warrior",
}

-- Spec ID to English name mapping
-- Usage: I.SpecNames[specId] -> "Protection"
I.SpecNames = {
  -- Death Knight
  [250] = "Blood",
  [251] = "Frost",
  [252] = "Unholy",
  -- Demon Hunter
  [577] = "Havoc",
  [581] = "Vengeance",
  [1480] = "Devourer",
  -- Druid
  [102] = "Balance",
  [103] = "Feral",
  [104] = "Guardian",
  [105] = "Restoration",
  -- Evoker
  [1467] = "Devastation",
  [1468] = "Preservation",
  [1473] = "Augmentation",
  -- Hunter
  [253] = "Beast Mastery",
  [254] = "Marksmanship",
  [255] = "Survival",
  -- Mage
  [62] = "Arcane",
  [63] = "Fire",
  [64] = "Frost",
  -- Monk
  [268] = "Brewmaster",
  [270] = "Mistweaver",
  [269] = "Windwalker",
  -- Paladin
  [65] = "Holy",
  [66] = "Protection",
  [70] = "Retribution",
  -- Priest
  [256] = "Discipline",
  [257] = "Holy",
  [258] = "Shadow",
  -- Rogue
  [259] = "Assassination",
  [260] = "Outlaw",
  [261] = "Subtlety",
  -- Shaman
  [262] = "Elemental",
  [263] = "Enhancement",
  [264] = "Restoration",
  -- Warlock
  [265] = "Affliction",
  [266] = "Demonology",
  [267] = "Destruction",
  -- Warrior
  [71] = "Arms",
  [72] = "Fury",
  [73] = "Protection",
}
