import { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } from 'discord.js';

export default {
  data: new SlashCommandBuilder()
    .setName('help')
    .setDescription('Tampilkan daftar command'),
  async execute(interaction) {
    const embed = new EmbedBuilder()
      .setTitle('🤖 HaikzBot — Command List')
      .setColor(0x5865f2)
      .setDescription('Discord Commerce & Automation Platform')
      .addFields(
        {
          name: '⚙️  Setup & Admin',
          value: [
            '`/setup` — Wizard awal (store, ticket, welcome, logs)',
            '`/clone` — Clone struktur server (kategori/channel/role)',
            '`/config` — Lihat konfigurasi guild ini',
            '`/staff` — Atur role staff',
          ].join('\n'),
        },
        {
          name: '🛒 Store',
          value: [
            '`/product add` — Tambah produk',
            '`/product list` — Lihat semua produk',
            '`/stock add` — Isi stok produk',
            '`/store panel` — Kirim panel beli ke channel',
          ].join('\n'),
        },
        {
          name: '🎫 Ticket',
          value: [
            '`/ticket panel` — Kirim panel buka ticket',
            '`/ticket close` — Tutup ticket (di dalam channel ticket)',
          ].join('\n'),
        },
        {
          name: '🛠️  Utility',
          value: [
            '`/emoji add` — Upload emoji dari URL/attachment',
            '`/welcome set` — Set channel welcome',
            '`/log set` — Set channel log',
          ].join('\n'),
        },
      )
      .setFooter({ text: 'Tip: Mulai dari /setup biar otomatis' });

    await interaction.reply({ embeds: [embed], ephemeral: true });
  },
};
