export class AchievementDisplay {
  static getRarityVariant(rarity: string) {
    switch (rarity.toLowerCase()) {
      case 'common':
        return { text: 'low' as const, surface: 'rarity-common' as const, iconIntent: 'low' as const };
      case 'rare':
        return { text: 'primary' as const, surface: 'rarity-rare' as const, iconIntent: 'primary' as const };
      case 'epic':
        return { text: 'primary' as const, surface: 'rarity-epic' as const, iconIntent: 'primary' as const };
      case 'legendary':
        return { text: 'warning' as const, surface: 'rarity-legendary' as const, iconIntent: 'warning' as const };
      default:
        return { text: 'low' as const, surface: 'rarity-common' as const, iconIntent: 'low' as const };
    }
  }

  static formatDate(date: Date): string {
    const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
    return `${months[date.getMonth()]} ${date.getDate()}, ${date.getFullYear()}`;
  }
}
