"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isValidSet = exports.brawlSets = exports.vanillaSets = exports.duelsSets = exports.arenaSets = exports.twistSets = exports.standardSets = exports.wildSets = exports.sets = void 0;
const public_api_1 = require("../../public-api");
exports.sets = [
    {
        id: 'cataclysm',
        name: `Cataclysm`,
        launchDate: new Date('2026-03-17'),
    },
    {
        id: 'echoes_of_the_infinite',
        name: `Echoes of the Infinite`,
        launchDate: new Date('2026-01-13'),
        miniSetFor: 'across_the_timeways',
    },
    {
        id: 'across_the_timeways',
        name: `Across the Timeways`,
        launchDate: new Date('2025-09-29'),
    },
    {
        id: 'day_of_rebirth',
        name: `Day of Rebirth`,
        launchDate: new Date('2025-09-02'),
        miniSetFor: 'lost_city_of_ungoro',
    },
    {
        id: 'lost_city_of_ungoro',
        name: `The Lost City of Un'Goro`,
        launchDate: new Date('2025-07-08'),
    },
    {
        id: 'embers_of_the_world_tree',
        name: `Embers of the World Tree`,
        launchDate: new Date('2025-05-13'),
        miniSetFor: 'into_the_emerald_dream',
    },
    {
        id: 'into_the_emerald_dream',
        name: `Into the Emerald Dream`,
        launchDate: new Date('2025-03-18'),
    },
    {
        id: 'gift',
        name: `Gifts`,
        launchDate: new Date('2025-03-17'),
        techSet: true,
    },
    {
        id: 'heroes_of_starcraft',
        name: `Heroes of Starcraft`,
        launchDate: new Date('2025-01-21'),
        miniSetFor: 'great_dark_beyond',
    },
    {
        id: 'great_dark_beyond',
        name: `The Great Dark Beyond`,
        launchDate: new Date('2024-11-05'),
    },
    {
        id: 'traveling_travel_agency',
        name: `The Traveling Travel Agency`,
        launchDate: new Date('2024-09-10'),
        miniSetFor: 'perils_in_paradise',
    },
    {
        id: 'perils_in_paradise',
        name: `Perils in Paradise`,
        launchDate: new Date('2024-06-17'),
    },
    {
        id: 'boom_inventions',
        name: `Dr. Boom’s Incredible Inventions`,
        launchDate: new Date('2024-05-14'),
        miniSetFor: 'whizbangs_workshop',
    },
    {
        id: 'whizbangs_workshop',
        name: `Whizbang's Workshop`,
        launchDate: new Date('2024-02-13'),
    },
    {
        id: 'deepholm',
        name: `Delve into Deepholm`,
        launchDate: new Date('2024-01-18'),
        miniSetFor: 'wild_west',
    },
    {
        id: 'wild_west',
        name: `Showdown in the Badlands`,
        launchDate: new Date('2023-11-14'),
    },
    {
        id: 'ulduar',
        name: `Fall of Ulduar`,
        launchDate: new Date('2023-09-19'),
        miniSetFor: 'titans',
    },
    {
        id: 'caverns_of_time',
        name: `Caverns of Time`,
        launchDate: new Date('2023-08-31'),
    },
    {
        id: 'titans',
        name: `TITANS`,
        launchDate: new Date('2023-06-27'),
    },
    {
        id: 'audiopocalypse',
        name: `Audiopocalypse`,
        launchDate: new Date('2023-05-31'),
        miniSetFor: 'battle_of_the_bands',
    },
    {
        id: 'battle_of_the_bands',
        name: `Battle of the Bands`,
        launchDate: new Date('2023-03-15'),
    },
    {
        id: 'return_to_naxxramas',
        name: `Return to Naxxramas`,
        launchDate: new Date('2023-02-14'),
        miniSetFor: 'return_of_the_lich_king',
    },
    {
        id: 'path_of_arthas',
        name: `Path of Arthas`,
        launchDate: new Date('2022-11-01'),
    },
    {
        id: 'return_of_the_lich_king',
        name: `March of the Lich King`,
        launchDate: new Date('2022-11-01'),
    },
    {
        id: 'maw_and_disorder',
        name: `Maw and Disorder`,
        launchDate: new Date('2022-09-27'),
        miniSetFor: 'revendreth',
    },
    {
        id: 'revendreth',
        name: `Murder at Castle Nathria`,
        launchDate: new Date('2022-08-02'),
    },
    {
        id: 'throne_of_tides',
        name: `Throne of the Tides`,
        launchDate: new Date('2022-06-01'),
        miniSetFor: 'the_sunken_city',
    },
    {
        id: 'the_sunken_city',
        name: `The Sunken City`,
        launchDate: new Date('2022-03-17'),
    },
    {
        id: 'onyxias_lair',
        name: `Onyxia's Lair`,
        launchDate: new Date('2022-02-15'),
        miniSetFor: 'alterac_valley',
    },
    {
        id: 'alterac_valley',
        name: 'Fractured in Alterac Valley',
        launchDate: new Date('2021-12-07'),
    },
    {
        id: 'deadmines',
        name: 'Deadmines',
        launchDate: new Date('2021-11-02'),
        miniSetFor: 'stormwind',
    },
    {
        id: 'stormwind',
        name: 'United in Stormwind',
        launchDate: new Date('2021-07-01'),
    },
    {
        id: 'wailing_caverns',
        name: 'Wailing Caverns',
        launchDate: new Date('2021-06-03'),
        miniSetFor: 'the_barrens',
    },
    {
        id: 'the_barrens',
        name: 'Forged in the Barrens',
        launchDate: new Date('2021-03-15'),
    },
    {
        id: 'darkmoon_races',
        name: 'Darkmoon Races',
        launchDate: new Date('2021-01-21'),
        miniSetFor: 'darkmoon_faire',
    },
    {
        id: 'darkmoon_faire',
        name: 'Darkmoon Faire',
        launchDate: new Date('2020-11-17'),
    },
    {
        id: 'scholomance',
        name: 'Scholomance Academy',
        launchDate: new Date('2020-08-06'),
    },
    {
        id: 'black_temple',
        name: 'Ashes of Outland',
        launchDate: new Date('2020-04-07'),
    },
    {
        id: 'demon_hunter_initiate',
        name: 'Demon Hunter Initiate',
        launchDate: new Date('2020-04-02'),
    },
    {
        id: 'yod',
        name: "Galakrond's Awakening",
        launchDate: new Date('2020-01-21'),
    },
    {
        id: 'dragons',
        name: 'Descent of Dragons',
        launchDate: new Date('2019-12-10'),
    },
    {
        id: 'uldum',
        name: 'Saviors of Uldum',
        launchDate: new Date('2019-08-06'),
    },
    {
        id: 'dalaran',
        name: 'Rise of Shadows',
        launchDate: new Date('2019-04-09'),
    },
    {
        id: 'troll',
        name: "Rastakhan's Rumble",
        launchDate: new Date('2018-12-04'),
    },
    {
        id: 'boomsday',
        name: 'The Boomsday Project',
        launchDate: new Date('2018-08-07'),
    },
    {
        id: 'gilneas',
        name: 'The Witchwood',
        launchDate: new Date('2018-04-12'),
    },
    {
        id: 'lootapalooza',
        name: 'Kobolds and Catacombs',
        launchDate: new Date('2017-12-07'),
    },
    {
        id: 'icecrown',
        name: 'Knights of the Frozen Throne',
        launchDate: new Date('2017-08-10'),
    },
    {
        id: 'ungoro',
        name: "Journey to Un'Goro",
        launchDate: new Date('2017-04-06'),
    },
    {
        id: 'gangs',
        name: 'Mean Streets of Gadgetzan',
        launchDate: new Date('2016-12-1'),
    },
    {
        id: 'kara',
        name: 'One Night in Karazhan',
        launchDate: new Date('2016-08-11'),
    },
    {
        id: 'og',
        name: 'Whispers of the Old Gods',
        launchDate: new Date('2016-04-26'),
    },
    {
        id: 'loe',
        name: 'League of Explorers',
        launchDate: new Date('2015-11-12'),
    },
    {
        id: 'tgt',
        name: 'The Grand Tournament',
        launchDate: new Date('2015-08-24'),
    },
    {
        id: 'brm',
        name: 'Blackrock Mountain',
        launchDate: new Date('2015-04-02'),
    },
    {
        id: 'gvg',
        name: 'Goblins vs Gnomes',
        launchDate: new Date('2014-12-08'),
    },
    {
        id: 'naxx',
        name: 'Naxxramas',
        launchDate: new Date('2014-07-22'),
    },
    {
        id: 'core',
        name: 'Core',
        launchDate: new Date('2021-03-25'),
    },
    {
        id: 'legacy',
        name: 'Legacy',
        launchDate: new Date('2021-03-30'),
    },
];
exports.wildSets = exports.sets.map((s) => s.id);
const standardBaseSets = [
    'core',
    'gift',
    'whizbangs_workshop',
    'perils_in_paradise',
    'great_dark_beyond',
    'into_the_emerald_dream',
    'lost_city_of_ungoro',
    'across_the_timeways',
    'cataclysm',
];
exports.standardSets = standardBaseSets
    .flatMap((setId) => { var _a; return [setId, (_a = exports.sets.find((s) => s.miniSetFor === setId)) === null || _a === void 0 ? void 0 : _a.id]; })
    .filter((setId) => setId)
    .map((setId) => setId);
const twistBaseSets = [];
exports.twistSets = twistBaseSets
    .flatMap((setId) => { var _a; return [setId, (_a = exports.sets.find((s) => s.miniSetFor === setId)) === null || _a === void 0 ? void 0 : _a.id]; })
    .filter((setId) => setId)
    .map((setId) => setId);
const arenaBaseSets = [];
exports.arenaSets = arenaBaseSets
    .flatMap((setId) => { var _a; return [setId, (_a = exports.sets.find((s) => s.miniSetFor === setId)) === null || _a === void 0 ? void 0 : _a.id]; })
    .filter((setId) => setId);
exports.duelsSets = [];
exports.vanillaSets = ['vanilla'];
exports.brawlSets = {
    5465: ['across_the_timeways', 'lost_city_of_ungoro', 'day_of_rebirth', 'core'],
};
const isValidSet = (set, format, gameType) => {
    switch (gameType) {
        case public_api_1.GameType.GT_ARENA:
        case public_api_1.GameType.GT_UNDERGROUND_ARENA:
            return exports.arenaSets.includes(set);
    }
    switch (format) {
        case public_api_1.GameFormat.FT_STANDARD:
            return exports.standardSets.includes(set);
        case public_api_1.GameFormat.FT_TWIST:
            return exports.twistSets.includes(set);
        case public_api_1.GameFormat.FT_WILD:
        default:
            return exports.wildSets.includes(set);
    }
};
exports.isValidSet = isValidSet;
//# sourceMappingURL=reference-sets.js.map