import { createCommand } from "@/lib/utils";
import { SlashCommandBuilder, PermissionFlagsBits, MessageFlags } from "discord.js";
import { renderWizard } from "@/modules/admin/item_wizard";

export const createItem = createCommand({
    data: new SlashCommandBuilder()
        .setName("createitem")
        .setDescription("Create a new item using the interactive wizard")
        .setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
    execute: async (interaction) => {
        const payload = renderWizard(interaction.user.id);
        await interaction.reply({ ...payload, flags: MessageFlags.Ephemeral });
    }
});
