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

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

const toHexInteger = (permissions: string[], array?: string[]): string => {
    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: string, array?: string[]): string[] => {
    if (!array) {
        array = logs;
    }
    const permissions: string[] = [];
    const int = BigInt("0x" + permissionsHex)
        .toString(2)
        .split("")
        .reverse();
    for (const index in int) {
        if (int[index] === "1" && array.length > parseInt(index)) {
            permissions.push(array[index]!);
        }
    }
    return permissions;
};

export { toHexInteger, toHexArray, tickets, logs };
