import Discord, { CommandInteraction, MessageActionRow, MessageButton } from "discord.js";
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { WrappedCheck } from "jshaiku";
import generateEmojiEmbed from "../../utils/generateEmojiEmbed.js";
import getEmojiByName from "../../utils/getEmojiByName.js";
import generateKeyValueList from "../../utils/generateKeyValueList.js";

const command = (builder: SlashCommandSubcommandBuilder) =>
    builder
    .setName("about")
    .setDescription("Shows info about a user")
    .addUserOption(option => option.setName("user").setDescription("The user to get info about | Default: Yourself"))

const callback = async (interaction: CommandInteraction) => {
    // @ts-ignore
    const { renderUser, renderDelta } = interaction.client.logger
    let member = (interaction.options.getMember("user") || interaction.member) as Discord.GuildMember;
    let flags: string[] = [];
    if ([
        "438733159748599813", // Pinea
        "317731855317336067", // Mini
        "261900651230003201", // Coded
        "511655498676699136", // Zan
    ].includes(member.user.id)) { flags.push("NUCLEUSDEVELOPER") }
    if ((await interaction.client.guilds.cache.get("684492926528651336")?.members.fetch())?.filter(m => m.roles.cache.has("760896837866749972"))?.map(m => m.id).includes(member.user.id)) { flags.push("CLICKSDEVELOPER") }
    member.user.flags.toArray().map(flag => {
        flags.push(flag.toString())
    })
    if (member.user.bot === true) { flags.push("BOT") }
    // Check if they are boosting the server
    if (member.premiumSince) { flags.push("BOOSTER") }
    let nameReplacements = {
        "NUCLEUSDEVELOPER": "**Nucleus Developer**",
        "CLICKSDEVELOPER": "Clicks Developer",
        "HOUSE_BRAVERY": "Hypesquad Bravery",
        "HOUSE_BRILLIANCE": "Hypesquad Brilliance",
        "HOUSE_BALANCE": "Hypesquad Balance",
        "HYPESQUAD_EVENTS": "Hypesquad Events",
        "EARLY_SUPPORTER": "Early Supporter",
        "BUGHUNTER_LEVEL_1": "Bug Hunter Level 1",
        "BUGHUNTER_LEVEL_2": "Bug Hunter Level 2",
        "PARTNERED_SERVER_OWNER": "Partnered Server Owner",
        "DISCORD_EMPLOYEE": "Discord Staff",
        "EARLY_VERIFIED_BOT_DEVELOPER": "Verified Bot Developer",
        "BOT": "Bot",
        "BOOSTER": "Server Booster"
    }
    let members = await interaction.guild.members.fetch()
    let membersArray = [...members.values()]
    membersArray.sort((a, b) => a.joinedTimestamp - b.joinedTimestamp)
    let joinPos = membersArray.findIndex(m => m.id === member.user.id)

    let roles = member.roles.cache.filter(r => r.id != interaction.guild.id).sort()
    let s = "";
    let count = 0;
    let ended = false
    roles.map(item => {
        if (ended) return;
        let string = `<@&${item.id}>, `
        if(s.length + string.length > 1000) {
            ended = true
            s += `and ${roles.size - count} more`
            return
        };
        count ++
        s += string;
    })
    if(s.length > 0 && !ended) s = s.slice(0, -2);

    let perms = ""
    let permsArray = {
        "ADMINISTRATOR": "Administrator",
        "MANAGE_GUILD": "Manage Server",
        "MANAGE_ROLES": "Manage Roles",
        "MANAGE_CHANNELS": "Manage Channels",
        "KICK_MEMBERS": "Kick Members",
        "BAN_MEMBERS": "Ban Members",
        "MODERATE_MEMBERS": "Moderate Members",
        "MANAGE_NICKNAMES": "Manage Nicknames",
        "MANAGE_WEBHOOKS": "Manage Webhooks",
        "MANAGE_MESSAGES": "Manage Messages",
        "VIEW_AUDIT_LOG": "View Audit Log",
        "MENTION_EVERYONE": "Mention Everyone"
    }
    Object.keys(permsArray).map(perm => {
        let hasPerm = member.permissions.has(perm as Discord.PermissionString)
        perms += `${getEmojiByName("CONTROL." + (hasPerm ? "TICK" : "CROSS"))} ${permsArray[perm]}\n`
    })

    let embeds = [
        new generateEmojiEmbed()
            .setTitle("User Info: General")
            .setStatus("Success")
            .setEmoji("MEMBER.JOIN")
            .setDescription(
                flags.map(flag => {
                    if (nameReplacements[flag]) {
                        return getEmojiByName(`BADGES.${flag}`) + " " + nameReplacements[flag];
                    }
                }).join("\n") + "\n\n" +
                generateKeyValueList({
                    "member": renderUser(member.user),
                    "nickname": member.nickname || "*None set*",
                    "id": `\`${member.id}\``,
                    "joined the server": renderDelta(member.joinedTimestamp),
                    "joined discord": renderDelta(member.user.createdTimestamp),
                    "boost status": member.premiumSince ? `Started boosting ${renderDelta(member.premiumSinceTimestamp)}` : "*Not boosting*",
                    "join position": `${joinPos + 1}`
                })
            )
            .setThumbnail(await member.user.displayAvatarURL({dynamic: true}))
            .setImage((await member.user.fetch()).bannerURL({format: "gif"})),
        new generateEmojiEmbed()
            .setTitle("User Info: Roles")
            .setStatus("Success")
            .setEmoji("GUILD.ROLES.CREATE")
            .setDescription(
                generateKeyValueList({
                    "member": renderUser(member.user),
                    "id": `\`${member.id}\``,
                    "roles": `${member.roles.cache.size - 1}`,
                }) + "\n" +
                (s.length > 0 ? s : "*None*")
            )
            .setThumbnail(await member.user.displayAvatarURL({dynamic: true})),
        new generateEmojiEmbed()
            .setTitle("User Info: Key Permissions")
            .setStatus("Success")
            .setEmoji("GUILD.ROLES.CREATE")
            .setDescription(
                generateKeyValueList({
                    "member": renderUser(member.user),
                    "id": `\`${member.id}\``,
                }) + "\n" + perms
            )
            .setThumbnail(await member.user.displayAvatarURL({dynamic: true}))
    ]
    let m
    m = await interaction.reply({embeds: [new generateEmojiEmbed().setTitle("Loading").setEmoji("NUCLEUS.LOADING").setStatus("Danger")], fetchReply: true, ephemeral: true});
    let page = 0
    while (true) {
        await interaction.editReply({
            embeds: [embeds[page].setFooter({text: `Page ${page + 1} of ${embeds.length}`})],
            components: [new MessageActionRow().addComponents([
                new MessageButton()
                    .setEmoji(getEmojiByName("CONTROL.LEFT", "id"))
                    .setStyle("SECONDARY")
                    .setCustomId("left")
                    .setDisabled(page === 0),
                new MessageButton()
                    .setEmoji(getEmojiByName("CONTROL.RIGHT", "id"))
                    .setCustomId("right")
                    .setStyle("SECONDARY")
                    .setDisabled(page === embeds.length - 1),
                new MessageButton()
                    .setEmoji(getEmojiByName("CONTROL.CROSS", "id"))
                    .setCustomId("close")
                    .setStyle("DANGER")
            ])]
        })
        let i
        try {
            i = await m.awaitMessageComponent({componentType: "BUTTON", time: 600000});
        } catch { break }
        i.deferUpdate()
        if (i.component.customId == "left") {
            if (page > 0) page--;
        } else if (i.component.customId == "right") {
            if (page < embeds.length - 1) page++;
        } else if (i.component.customId == "close") {
            break;
        } else {
            break;
        }
    }
    await interaction.editReply({embeds: [m.embeds[0]], components: [new MessageActionRow().addComponents([
        new MessageButton()
            .setEmoji(getEmojiByName("CONTROL.LEFT", "id"))
            .setStyle("SECONDARY")
            .setCustomId("left")
            .setDisabled(true),
        new MessageButton()
            .setEmoji(getEmojiByName("CONTROL.RIGHT", "id"))
            .setCustomId("right")
            .setStyle("SECONDARY")
            .setDisabled(true),
        new MessageButton()
            .setEmoji(getEmojiByName("CONTROL.CROSS", "id"))
            .setCustomId("close")
            .setStyle("PRIMARY")
            .setDisabled(true)
    ])]})
}

const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
    return true;
}

export { command };
export { callback };
export { check };