"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PILL_EFFECT_TYPE_TO_PILL_EFFECTS = void 0;
const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
const constantsVanilla_1 = require("../core/constantsVanilla");
const array_1 = require("../functions/array");
const pillEffectTypes_1 = require("./pillEffectTypes");
exports.PILL_EFFECT_TYPE_TO_PILL_EFFECTS = {
    // 0
    [isaac_typescript_definitions_1.ItemConfigPillEffectType.POSITIVE]: getPillEffectsOfType(isaac_typescript_definitions_1.ItemConfigPillEffectType.POSITIVE),
    // 1
    [isaac_typescript_definitions_1.ItemConfigPillEffectType.NEGATIVE]: getPillEffectsOfType(isaac_typescript_definitions_1.ItemConfigPillEffectType.NEGATIVE),
    // 2
    [isaac_typescript_definitions_1.ItemConfigPillEffectType.NEUTRAL]: getPillEffectsOfType(isaac_typescript_definitions_1.ItemConfigPillEffectType.NEUTRAL),
    // 3
    [isaac_typescript_definitions_1.ItemConfigPillEffectType.MODDED]: getPillEffectsOfType(isaac_typescript_definitions_1.ItemConfigPillEffectType.MODDED),
};
function getPillEffectsOfType(matchingPillEffectType) {
    return (0, array_1.filterMap)(constantsVanilla_1.VANILLA_PILL_EFFECTS, (pillEffect) => {
        const pillEffectType = pillEffectTypes_1.PILL_EFFECT_TYPES[pillEffect];
        return pillEffectType === matchingPillEffectType ? pillEffect : undefined;
    });
}
