import Discord, { MessageButton, MessageActionRow } from "discord.js";
import client from "../../utils/client.js";
import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
import getEmojiByName from "../../utils/getEmojiByName.js";

export default async function (interaction) {
    const {
        log,
        NucleusColors,
        entry,
        renderUser,
        renderChannel,
        renderDelta
    } = client.logger;

    const config = await client.database.guilds.read(interaction.guild.id);
    let thread = false;
    if (interaction.channel instanceof Discord.ThreadChannel) thread = true;
    const threadChannel = interaction.channel as Discord.ThreadChannel;
    const channel = interaction.channel as Discord.TextChannel;
    if (
        !channel.parent ||
        config.tickets.category !== channel.parent.id ||
        (thread
            ? threadChannel.parent.parent.id !== config.tickets.category
            : false)
    ) {
        return interaction.reply({
            embeds: [
                new EmojiEmbed()
                    .setTitle("Deleting Ticket...")
                    .setDescription(
                        "This ticket is not in your tickets category, so cannot be deleted. You cannot run close in a thread."
                    )
                    .setStatus("Danger")
                    .setEmoji("CONTROL.BLOCKCROSS")
            ],
            ephemeral: true
        });
    }
    const status = channel.topic.split(" ")[1];
    if (status === "Archived") {
        await interaction.reply({
            embeds: [
                new EmojiEmbed()
                    .setTitle("Delete Ticket")
                    .setDescription("Your ticket is being deleted...")
                    .setStatus("Danger")
                    .setEmoji("GUILD.TICKET.CLOSE")
            ]
        });
        const data = {
            meta: {
                type: "ticketDeleted",
                displayName: "Ticket Deleted",
                calculateType: "ticketUpdate",
                color: NucleusColors.red,
                emoji: "GUILD.TICKET.CLOSE",
                timestamp: new Date().getTime()
            },
            list: {
                ticketFor: entry(
                    channel.topic.split(" ")[0],
                    renderUser(
                        (
                            await interaction.guild.members.fetch(
                                channel.topic.split(" ")[0]
                            )
                        ).user
                    )
                ),
                deletedBy: entry(
                    interaction.member.user.id,
                    renderUser(interaction.member.user)
                ),
                deleted: entry(
                    new Date().getTime(),
                    renderDelta(new Date().getTime())
                )
            },
            hidden: {
                guild: interaction.guild.id
            }
        };
        log(data);
        interaction.channel.delete();
        return;
    } else if (status === "Active") {
        await interaction.reply({
            embeds: [
                new EmojiEmbed()
                    .setTitle("Close Ticket")
                    .setDescription("Your ticket is being closed...")
                    .setStatus("Warning")
                    .setEmoji("GUILD.TICKET.ARCHIVED")
            ]
        });
        const overwrites = [
            {
                id: channel.topic.split(" ")[0],
                deny: ["VIEW_CHANNEL"],
                type: "member"
            },
            {
                id: interaction.guild.id,
                deny: ["VIEW_CHANNEL"],
                type: "role"
            }
        ] as Discord.OverwriteResolvable[];
        if (config.tickets.supportRole !== null) {
            overwrites.push({
                id: interaction.guild.roles.cache.get(
                    config.tickets.supportRole
                ),
                allow: [
                    "VIEW_CHANNEL",
                    "SEND_MESSAGES",
                    "ATTACH_FILES",
                    "ADD_REACTIONS",
                    "READ_MESSAGE_HISTORY"
                ],
                type: "role"
            });
        }
        channel.edit({ permissionOverwrites: overwrites });
        channel.setTopic(`${channel.topic.split(" ")[0]} Archived`);
        const data = {
            meta: {
                type: "ticketClosed",
                displayName: "Ticket Closed",
                calculateType: "ticketUpdate",
                color: NucleusColors.yellow,
                emoji: "GUILD.TICKET.ARCHIVED",
                timestamp: new Date().getTime()
            },
            list: {
                ticketFor: entry(
                    channel.topic.split(" ")[0],
                    renderUser(
                        (
                            await interaction.guild.members.fetch(
                                channel.topic.split(" ")[0]
                            )
                        ).user
                    )
                ),
                closedBy: entry(
                    interaction.member.user.id,
                    renderUser(interaction.member.user)
                ),
                closed: entry(
                    new Date().getTime(),
                    renderDelta(new Date().getTime())
                ),
                ticketChannel: entry(channel.id, renderChannel(channel))
            },
            hidden: {
                guild: interaction.guild.id
            }
        };
        log(data);
        await interaction.editReply({
            embeds: [
                new EmojiEmbed()
                    .setTitle("Close Ticket")
                    .setDescription(
                        "This ticket has been closed.\nType `/ticket close` again to delete it.\n\nNote: Check `/privacy` for details about transcripts."
                    )
                    .setStatus("Warning")
                    .setEmoji("GUILD.TICKET.ARCHIVED")
            ],
            components: [
                new MessageActionRow().addComponents(
                    [
                        new MessageButton()
                            .setLabel("Delete")
                            .setStyle("DANGER")
                            .setCustomId("closeticket")
                            .setEmoji(getEmojiByName("CONTROL.CROSS", "id"))
                    ].concat(
                        client.database.premium.hasPremium(interaction.guild.id)
                            ? [
                                  new MessageButton()
                                      .setLabel("Create Transcript and Delete")
                                      .setStyle("PRIMARY")
                                      .setCustomId("createtranscript")
                                      .setEmoji(
                                          getEmojiByName(
                                              "CONTROL.DOWNLOAD",
                                              "id"
                                          )
                                      )
                              ]
                            : []
                    )
                )
            ]
        });
        return;
    }
}

async function purgeByUser(member, guild) {
    const config = await client.database.guilds.read(guild.id);
    if (!config.tickets.category) return;
    const tickets = guild.channels.cache.get(config.tickets.category);
    if (!tickets) return;
    const ticketChannels = tickets.children;
    let deleted = 0;
    ticketChannels.forEach((element) => {
        if (element.type !== "GUILD_TEXT") return;
        if (element.topic.split(" ")[0] === member) {
            try {
                element.delete();
            } catch {
                /* Errors if the channel does not exist (deleted already) */
            }
            deleted++;
        }
    });
    if (deleted) {
        const { log, NucleusColors, entry, renderUser, renderDelta } =
            member.client.logger;
        const data = {
            meta: {
                type: "ticketPurge",
                displayName: "Tickets Purged",
                calculateType: "ticketUpdate",
                color: NucleusColors.red,
                emoji: "GUILD.TICKET.DELETE",
                timestamp: new Date().getTime()
            },
            list: {
                ticketFor: entry(member, renderUser(member)),
                deletedBy: entry(null, "Member left server"),
                deleted: entry(
                    new Date().getTime(),
                    renderDelta(new Date().getTime())
                ),
                ticketsDeleted: deleted
            },
            hidden: {
                guild: guild.id
            }
        };
        log(data);
    }
}

export { purgeByUser };
