"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.boosterIdToBoosterName = exports.getDefaultBoosterIdForSetId = exports.boosterIdToSetId = void 0;
const public_api_1 = require("../public-api");
const boosterIdToSetId = (boosterId) => {
    var _a, _b, _c;
    switch (boosterId) {
        case public_api_1.BoosterType.MERCENARIES:
            return 'lettuce';
        case public_api_1.BoosterType.CLASSIC:
        case public_api_1.BoosterType.GOLDEN_CLASSIC:
            return 'expert1';
        case public_api_1.BoosterType.GOBLINS_VS_GNOMES:
            return 'gvg';
        case public_api_1.BoosterType.THE_GRAND_TOURNAMENT:
            return 'tgt';
        case public_api_1.BoosterType.OLD_GODS:
        case public_api_1.BoosterType.WELCOME_BUNDLE:
            return 'og';
        case public_api_1.BoosterType.MEAN_STREETS:
            return 'gangs';
        case public_api_1.BoosterType.UNGORO:
            return 'ungoro';
        case public_api_1.BoosterType.FROZEN_THRONE:
            return 'icecrown';
        case public_api_1.BoosterType.KOBOLDS_AND_CATACOMBS:
            return 'lootapalooza';
        case public_api_1.BoosterType.WITCHWOOD:
            return 'gilneas';
        case public_api_1.BoosterType.THE_BOOMSDAY_PROJECT:
            return 'boomsday';
        case public_api_1.BoosterType.RASTAKHANS_RUMBLE:
            return 'troll';
        case public_api_1.BoosterType.DALARAN:
            return 'dalaran';
        case public_api_1.BoosterType.ULDUM:
            return 'uldum';
        case public_api_1.BoosterType.DRAGONS:
            return 'dragons';
        case public_api_1.BoosterType.BLACK_TEMPLE:
            return 'black_temple';
        case public_api_1.BoosterType.SCHOLOMANCE:
        case public_api_1.BoosterType.GOLDEN_SCHOLOMANCE:
            return 'scholomance';
        case public_api_1.BoosterType.DARKMOON_FAIRE:
        case public_api_1.BoosterType.GOLDEN_DARKMOON_FAIRE:
            return 'darkmoon_faire';
        case public_api_1.BoosterType.THE_BARRENS:
        case public_api_1.BoosterType.GOLDEN_THE_BARRENS:
            return 'the_barrens';
        case public_api_1.BoosterType.STORMWIND:
        case public_api_1.BoosterType.STORMWIND_GOLDEN:
            return 'stormwind';
        case public_api_1.BoosterType.ALTERAC_VALLEY:
        case public_api_1.BoosterType.ALTERAC_VALLEY_GOLDEN:
            return 'alterac_valley';
        case public_api_1.BoosterType.THE_SUNKEN_CITY:
        case public_api_1.BoosterType.GOLDEN_THE_SUNKEN_CITY:
            return 'the_sunken_city';
        case public_api_1.BoosterType.REVENDRETH:
        case public_api_1.BoosterType.GOLDEN_REVENDRETH:
            return 'revendreth';
        case public_api_1.BoosterType.RETURN_OF_THE_LICH_KING:
        case public_api_1.BoosterType.GOLDEN_RETURN_OF_THE_LICH_KING:
            return 'return_of_the_lich_king';
        case public_api_1.BoosterType.BATTLE_OF_THE_BANDS:
        case public_api_1.BoosterType.GOLDEN_BATTLE_OF_THE_BANDS:
            return 'battle_of_the_bands';
        case public_api_1.BoosterType.TITANS:
        case public_api_1.BoosterType.GOLDEN_TITANS:
            return 'titans';
        case public_api_1.BoosterType.CAVERNS_OF_TIME:
            return 'caverns_of_time';
        case public_api_1.BoosterType.WILD_WEST:
            return 'wild_west';
        case public_api_1.BoosterType.WILD_WEST2:
            return 'wild_west2';
        case public_api_1.BoosterType.WHIZBANGS_WORKSHOP:
            return 'whizbangs_workshop';
        case public_api_1.BoosterType.ISLAND_VACATION:
        case public_api_1.BoosterType.GOLDEN_ISLAND_VACATION:
            return 'perils_in_paradise';
        case public_api_1.BoosterType.THE_GREAT_DARK_BEYOND:
        case public_api_1.BoosterType.GOLDEN_THE_GREAT_DARK_BEYOND:
            return 'great_dark_beyond';
        case public_api_1.BoosterType.INTO_THE_EMERALD_DREAM:
        case public_api_1.BoosterType.GOLDEN_INTO_THE_EMERALD_DREAM:
            return 'into_the_emerald_dream';
        case public_api_1.BoosterType.THE_LOST_CITY:
        case public_api_1.BoosterType.GOLDEN_THE_LOST_CITY:
            return 'lost_city_of_ungoro';
        case public_api_1.BoosterType.ACROSS_THE_TIMEWAYS:
        case public_api_1.BoosterType.GOLDEN_ACROSS_THE_TIMEWAYS:
            return 'across_the_timeways';
        case public_api_1.BoosterType.CATACLYSM:
        case public_api_1.BoosterType.GOLDEN_CATACLYSM:
            return 'cataclysm';
        default:
            const result = (_c = (_b = (_a = public_api_1.BoosterType[public_api_1.BoosterType[boosterId]]) === null || _a === void 0 ? void 0 : _a.toLowerCase) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : null;
            if (!result) {
                console.warn('unsupported booster type', boosterId);
            }
            return result;
    }
};
exports.boosterIdToSetId = boosterIdToSetId;
const getDefaultBoosterIdForSetId = (setId) => {
    switch (setId) {
        case 'expert1':
            return public_api_1.BoosterType.CLASSIC;
        case 'gvg':
            return public_api_1.BoosterType.GOBLINS_VS_GNOMES;
        case 'tgt':
            return public_api_1.BoosterType.THE_GRAND_TOURNAMENT;
        case 'og':
            return public_api_1.BoosterType.OLD_GODS;
        case 'gangs':
            return public_api_1.BoosterType.MEAN_STREETS;
        case 'ungoro':
            return public_api_1.BoosterType.UNGORO;
        case 'icecrown':
            return public_api_1.BoosterType.FROZEN_THRONE;
        case 'lootapalooza':
            return public_api_1.BoosterType.KOBOLDS_AND_CATACOMBS;
        case 'gilneas':
            return public_api_1.BoosterType.WITCHWOOD;
        case 'boomsday':
            return public_api_1.BoosterType.THE_BOOMSDAY_PROJECT;
        case 'troll':
        case 'rumble':
            return public_api_1.BoosterType.RASTAKHANS_RUMBLE;
        case 'dalaran':
            return public_api_1.BoosterType.DALARAN;
        case 'uldum':
            return public_api_1.BoosterType.ULDUM;
        case 'dragons':
            return public_api_1.BoosterType.DRAGONS;
        case 'black_temple':
            return public_api_1.BoosterType.BLACK_TEMPLE;
        case 'scholomance':
            return public_api_1.BoosterType.SCHOLOMANCE;
        case 'darkmoon_faire':
        case 'darkmoon_races':
            return public_api_1.BoosterType.DARKMOON_FAIRE;
        case 'the_barrens':
        case 'wailing_caverns':
            return public_api_1.BoosterType.THE_BARRENS;
        case 'stormwind':
        case 'deadmines':
            return public_api_1.BoosterType.STORMWIND;
        case 'alterac_valley':
        case 'onyxias_lair':
            return public_api_1.BoosterType.ALTERAC_VALLEY;
        case 'the_sunken_city':
        case 'throne_of_tides':
            return public_api_1.BoosterType.THE_SUNKEN_CITY;
        case 'revendreth':
        case 'maw_and_disorder':
            return public_api_1.BoosterType.REVENDRETH;
        case 'return_of_the_lich_king':
        case 'path_of_arthas':
            return public_api_1.BoosterType.RETURN_OF_THE_LICH_KING;
        case 'battle_of_the_bands':
            return public_api_1.BoosterType.BATTLE_OF_THE_BANDS;
        case 'titans':
            return public_api_1.BoosterType.TITANS;
        case 'caverns_of_time':
            return public_api_1.BoosterType.CAVERNS_OF_TIME;
        case 'whizbangs_workshop':
            return public_api_1.BoosterType.WHIZBANGS_WORKSHOP;
        case 'great_dark_beyond':
            return public_api_1.BoosterType.THE_GREAT_DARK_BEYOND;
        case 'into_the_emerald_dream':
            return public_api_1.BoosterType.INTO_THE_EMERALD_DREAM;
        case 'lost_city_of_ungoro':
            return public_api_1.BoosterType.THE_LOST_CITY;
        case 'across_the_timeways':
            return public_api_1.BoosterType.ACROSS_THE_TIMEWAYS;
        case 'cataclysm':
            return public_api_1.BoosterType.CATACLYSM;
        default:
            console.warn('no default booster type for set id', setId);
            return null;
    }
};
exports.getDefaultBoosterIdForSetId = getDefaultBoosterIdForSetId;
const boosterIdToBoosterName = (boosterId, i18n) => {
    var _a, _b;
    let normalizedBoosterId = boosterId;
    switch (boosterId) {
        case public_api_1.BoosterType.WELCOME_BUNDLE:
            normalizedBoosterId = public_api_1.BoosterType.OLD_GODS;
    }
    return i18n.translateString(`global.pack.${(_b = (_a = public_api_1.BoosterType[normalizedBoosterId]) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.replace(/_/g, '-')}`);
};
exports.boosterIdToBoosterName = boosterIdToBoosterName;
//# sourceMappingURL=collection-utils.js.map