"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DISCORD_BADGES = void 0;
exports.getBadgesFromFlags = getBadgesFromFlags;
exports.DISCORD_BADGES = {
    1: {
        description: 'Discord Staff',
        icon: 'https://raw.githubusercontent.com/kenndeclouv/badges-discord/main/assets/discordstaff.svg',
    },
    2: {
        description: 'Partnered Server Owner',
        icon: 'https://raw.githubusercontent.com/kenndeclouv/badges-discord/main/assets/discordpartner.svg',
    },
    4: {
        description: 'HypeSquad Events',
        icon: 'https://raw.githubusercontent.com/kenndeclouv/badges-discord/main/assets/hypesquadevents.svg',
    },
    8: {
        description: 'Bug Hunter Level 1',
        icon: 'https://raw.githubusercontent.com/kenndeclouv/badges-discord/main/assets/discordbughunter1.svg',
    },
    64: {
        description: 'House Bravery',
        icon: 'https://raw.githubusercontent.com/kenndeclouv/badges-discord/main/assets/hypesquadbravery.svg',
    },
    128: {
        description: 'House Brilliance',
        icon: 'https://raw.githubusercontent.com/kenndeclouv/badges-discord/main/assets/hypesquadbrilliance.svg',
    },
    256: {
        description: 'House Balance',
        icon: 'https://raw.githubusercontent.com/kenndeclouv/badges-discord/main/assets/hypesquadbalance.svg',
    },
    512: {
        description: 'Early Supporter',
        icon: 'https://raw.githubusercontent.com/kenndeclouv/badges-discord/main/assets/discordearlysupporter.svg',
    },
    16384: {
        description: 'Bug Hunter Level 2',
        icon: 'https://raw.githubusercontent.com/kenndeclouv/badges-discord/main/assets/discordbughunter2.svg',
    },
    131072: {
        description: 'Early Verified Bot Developer',
        icon: 'https://raw.githubusercontent.com/kenndeclouv/badges-discord/main/assets/discordbotdev.svg',
    },
    262144: {
        description: 'Discord Certified Moderator',
        icon: 'https://raw.githubusercontent.com/kenndeclouv/badges-discord/main/assets/discordmod.svg',
    },
    4194304: {
        description: 'Active Developer',
        icon: 'https://raw.githubusercontent.com/kenndeclouv/badges-discord/main/assets/activedeveloper.svg',
    },
    8388608: {
        description: 'Legacy Username',
        icon: 'https://raw.githubusercontent.com/kenndeclouv/badges-discord/main/assets/username.png',
    },
};
function getBadgesFromFlags(flags) {
    if (!flags)
        return [];
    const badges = [];
    for (const [flagStr, badgeData] of Object.entries(exports.DISCORD_BADGES)) {
        const flag = Number(flagStr);
        if ((flags & flag) === flag) {
            badges.push({
                id: flagStr,
                ...badgeData,
            });
        }
    }
    return badges;
}
//# sourceMappingURL=badges.js.map