import { describe, expect, it } from 'vitest';
import { commandLocale, localizedChoice } from './discord-localization.js';

describe('discord localization helpers', () => {
  it('maps command locales to Discord localization keys', () => {
    const locale = commandLocale('moderation.ban.description');
    expect(locale.description).toBe('Ban a user');
    expect(locale.descriptionLocalizations.de).toBe('Bannt einen Nutzer');
    expect(locale.descriptionLocalizations['en-US']).toBe('Ban a user');
  });

  it('maps choice labels with localizations', () => {
    const choice = localizedChoice('moderation.choice.ban', 'BAN');
    expect(choice.value).toBe('BAN');
    expect(choice.name_localizations?.de).toBe('Ban');
  });
});
