const logs = [
    "channelUpdate",
    "emojiUpdate",
    "stickerUpdate",
    "guildUpdate",
    "guildMemberUpdate",
    "guildMemberPunish",
    "guildRoleUpdate",
    "guildInviteUpdate",
    "messageUpdate",
    "messageDelete",
    "messageDeleteBulk",
    "messageReactionUpdate",
    "messageMassPing",
    "messageAnnounce",
    "threadUpdate",
    "webhookUpdate",
    "guildMemberVerify",
    "autoModeratorDeleted",
    "nucleusSettingsUpdated",
    "ticketUpdate"
];

const tickets = ["support", "report", "question", "issue", "suggestion", "other"];

const toHexInteger = (permissions, array?) => {
    if (!array) {
        array = logs;
    }
    let int = 0n;

    for (const perm of permissions) {
        int += BigInt(2 ** array.indexOf(perm));
    }
    return int.toString(16);
};

const toHexArray = (permissionsHex, array?) => {
    if (!array) {
        array = logs;
    }
    const permissions = [];
    const int = BigInt("0x" + permissionsHex)
        .toString(2)
        .split("")
        .reverse();
    for (const index in int) {
        if (int[index] === "1" && array.length > index) {
            permissions.push(array[index]);
        }
    }
    return permissions;
};

export { toHexInteger, toHexArray, tickets, logs };
