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";
import createPageIndicator from "../../utils/createPageIndicator.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*") + "\n"
            )
            .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) {
        let em = new Discord.MessageEmbed(embeds[page])
        em.setDescription(em.description + "\n" + createPageIndicator(embeds.length, page));
        await interaction.editReply({
            embeds: [em],
            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 };