--[[
============================================================================
ETB :: Data/AugustStone.lua
============================================================================
The Celestial-Dungeon "August Stone" currency chain. Each season introduces
a new currency that buys that tier's Celestial gear (the relabeled Raid
Finder / LFR appearances) from the Celestial vendor, and lets you down-
convert to the previous currency 1:1.

Verified currency IDs (resolved to names at runtime via GetCurrencyInfo):
  3350  August Stone Fragment  (Season 1 / Phase 1-2)  -> MSV / HoF / ToES gear
  3414  August Stone Shard     (Season 2 / Phase 3)    -> Throne of Thunder gear
  3416  August Stone Cluster   (Season 3 / Phase 4)    -> Siege of Orgrimmar gear

Vendors: Avatar of the August Celestials (S1/S2) and Celestial Harbinger (S3),
in the Shrine of Two Moons (Horde) / Shrine of Seven Stars (Alliance).

Down-conversion (in ATT as cu() nodes): 1 Shard buys 1 Fragment; 1 Cluster
buys 1 Shard. So a higher-season currency can always reach lower-tier gear.

This table is consumed by the cost renderer (Data/MapperBridge.lua :FormatCosts)
to annotate an August Stone cost with the tier it unlocks, e.g.
"60 August Stone Cluster (Siege of Orgrimmar)". It is intentionally small and
fact-checked rather than auto-generated, because per-item Cluster costs are not
yet present in the ATT snapshot (Season 3 released after it); when a newer ATT
carries them, the same Compact field-27 backfill used for Shards applies and
these names/tier hints render with no further code change.
============================================================================
]]--

local ADDON_NAME, NS = ...
NS.ETB = NS.ETB or {}
local ETB = NS.ETB

ETB.AugustStone = {
    -- currencyID -> { season, tier(display) }
    currencies = {
        [3350] = { season = 1, tier = "Mogu'shan Vaults / Heart of Fear / Terrace of Endless Spring" },
        [3414] = { season = 2, tier = "Throne of Thunder" },
        [3416] = { season = 3, tier = "Siege of Orgrimmar" },
    },
    -- short tier label for inline cost hints
    shortTier = {
        [3350] = "MSV / HoF / ToES",
        [3414] = "Throne of Thunder",
        [3416] = "Siege of Orgrimmar",
    },
    -- 1:1 down-conversions: higherCurrency -> currency it can buy
    convertsTo = {
        [3414] = 3350,   -- 1 Shard   -> 1 Fragment
        [3416] = 3414,   -- 1 Cluster -> 1 Shard
    },
}

function ETB.AugustStone:IsAugustStone(currencyID)
    return self.currencies[currencyID] ~= nil
end

function ETB.AugustStone:TierHint(currencyID)
    return self.shortTier[currencyID]
end
