/**
 * @copyright NHCarrigan
 * @license Naomi's Public License
 * @author Naomi Carrigan
 */
/* eslint-disable @typescript-eslint/naming-convention -- Achievement keys use snake_case for database identifiers */
/* eslint-disable sort-keys -- Achievements organized by category, not alphabetically */
/* eslint-disable sort-keys-fix/sort-keys-fix -- Achievements organized by category, not alphabetically */
/* eslint-disable stylistic/key-spacing -- Aligned for readability */
/* eslint-disable import/group-exports -- Single export at end of file */
import {
  AchievementCategory,
  type AchievementDefinition,
  AchievementTier,
} from "./achievement.types";

export const ACHIEVEMENTS: Record<string, AchievementDefinition> = {

  like_enthusiast: {
    category:     AchievementCategory.Like,
    description:  "Like 25 items in the library",
    icon:         "💕",
    key:          "like_enthusiast",
    points:       50,
    title: "Enthusiast",
    requirements: { count: 25 },
    tier:         AchievementTier.Bronze,
  },

  like_fan: {
    category:     AchievementCategory.Like,
    description:  "Like 100 items in the library",
    icon:         "💖",
    key:          "like_fan",
    points:       100,
    title: "Fan",
    requirements: { count: 100 },
    tier:         AchievementTier.Silver,
  },

  suggestion_acceptance_100: {
    category:     AchievementCategory.Suggestion,
    description:  "Achieve 100% acceptance rate (minimum 10 suggestions)",
    icon:         "✨",
    key:          "suggestion_acceptance_100",
    points:       500,
    requirements: { count: 10, rate: 1 },
    tier:         AchievementTier.Platinum,
    title: "Perfect Record",
  },

  like_book_lover: {
    description: "Like 50 books",
    key:          "like_book_lover",
    category:     AchievementCategory.Like,
    title: "Book Lover",
    icon:         "📚",
    points:       100,
    tier: AchievementTier.Silver,
    requirements: { count: 50 },
  },

  suggestion_acceptance_75: {
    category:     AchievementCategory.Suggestion,
    description:  "Maintain a 75%+ acceptance rate (minimum 20 suggestions)",
    icon:         "🎯",
    key:          "suggestion_acceptance_75",
    points:       300,
    requirements: { count: 20, rate: 0.75 },
    title: "Quality Over Quantity",
    tier:         AchievementTier.Gold,
  },

  suggestion_approved: {
    category:     AchievementCategory.Suggestion,
    description:  "Have your first suggestion accepted",
    icon:         "✅",
    key:          "suggestion_approved",
    points:       50,
    requirements: { count: 1 },
    tier:         AchievementTier.Bronze,
    title:        "Approved!",
  },

  like_cinephile: {
    description:  "Like 50 shows/films",
    category:     AchievementCategory.Like,
    key:          "like_cinephile",
    icon:         "🎬",
    title: "Cinephile",
    points:       100,
    requirements: { count: 50 },
    tier: AchievementTier.Silver,
  },

  suggestion_contributor: {
    category:     AchievementCategory.Suggestion,
    description:  "Submit 50 suggestions to the library",
    icon:         "📝",
    key:          "suggestion_contributor",
    points:       100,
    requirements: { count: 50 },
    tier:         AchievementTier.Silver,
    title:        "Contributor",
  },

  like_diverse: {
    description:  "Like items from all 6 media types",
    category:     AchievementCategory.Like,
    key:          "like_diverse",
    icon:         "🌍",
    title: "Diverse Taste",
    points:       200,
    requirements: { diversity: true },
    tier: AchievementTier.Gold,
  },

  suggestion_dedicated: {
    category:     AchievementCategory.Suggestion,
    description:  "Submit 100 suggestions to the library",
    icon:         "⭐",
    key:          "suggestion_dedicated",
    points:       250,
    requirements: { count: 100 },
    tier:         AchievementTier.Gold,
    title:        "Dedicated",
  },

  // ========== COMMENT ACHIEVEMENTS (12) ==========
  comment_first: {
    description:  "Leave your first comment in the library",
    category:     AchievementCategory.Comment,
    key:          "comment_first",
    icon:         "💬",
    title: "First Thoughts",
    points:       25,
    requirements: { count: 1 },
    tier: AchievementTier.Bronze,
  },

  suggestion_enthusiast: {
    category:     AchievementCategory.Suggestion,
    description:  "Submit 5 suggestions in one day",
    icon:         "🔥",
    key:          "suggestion_enthusiast",
    points:       150,
    requirements: { count: 5, dayRange: 1 },
    title: "Suggestion Enthusiast",
    tier:         AchievementTier.Silver,
  },

  comment_critic: {
    description:  "Leave 50 comments in the library",
    category:     AchievementCategory.Comment,
    key:          "comment_critic",
    icon:         "🗣️",
    title: "Critic",
    points:       100,
    requirements: { count: 50 },
    tier: AchievementTier.Silver,
  },

  // ========== SUGGESTION ACHIEVEMENTS (15) ==========
  suggestion_first_steps: {
    category:     AchievementCategory.Suggestion,
    description:  "Submit your first 10 suggestions to the library",
    icon:         "🌱",
    key:          "suggestion_first_steps",
    points:       50,
    requirements: { count: 10 },
    tier:         AchievementTier.Bronze,
    title:        "First Steps",
  },

  comment_expert: {
    category:     AchievementCategory.Comment,
    description:  "Leave 100 comments in the library",
    icon:         "🎭",
    key:          "comment_expert",
    points:       250,
    title: "Expert Critic",
    requirements: { count: 100 },
    tier:         AchievementTier.Gold,
  },

  suggestion_legend: {
    category:     AchievementCategory.Suggestion,
    description:  "Submit 500 suggestions to the library",
    icon:         "👑",
    key:          "suggestion_legend",
    points:       1000,
    requirements: { count: 500 },
    tier:         AchievementTier.Diamond,
    title:        "Legend",
  },

  comment_legend: {
    category:     AchievementCategory.Comment,
    description:  "Leave 500 comments in the library",
    icon:         "🏅",
    key:          "comment_legend",
    points:       1000,
    title: "Review Legend",
    requirements: { count: 500 },
    tier:         AchievementTier.Diamond,
  },

  suggestion_master: {
    category:     AchievementCategory.Suggestion,
    description:  "Submit 250 suggestions to the library",
    icon:         "💎",
    key:          "suggestion_master",
    points:       500,
    requirements: { count: 250 },
    tier:         AchievementTier.Platinum,
    title: "Master Curator",
  },

  comment_detailed: {
    category:     AchievementCategory.Comment,
    description:  "Write 10 comments with 500+ characters",
    icon:         "📝",
    key:          "comment_detailed",
    points:       150,
    requirements: { count: 10 },
    title: "Detailed Critic",
    tier:         AchievementTier.Silver,
  },

  suggestion_quality_10: {
    category:     AchievementCategory.Suggestion,
    description:  "Have 10 suggestions accepted",
    icon:         "🏆",
    key:          "suggestion_quality_10",
    points:       200,
    requirements: { count: 10 },
    tier:         AchievementTier.Gold,
    title: "Elite Curator",
  },

  comment_essay: {
    category:     AchievementCategory.Comment,
    description:  "Write 5 comments with 1000+ characters",
    icon:         "📄",
    key:          "comment_essay",
    points:       300,
    requirements: { count: 5 },
    tier:         AchievementTier.Gold,
    title: "Essay Writer",
  },

  suggestion_quality_100: {
    description:  "Have 100 suggestions accepted",
    category:     AchievementCategory.Suggestion,
    key:          "suggestion_quality_100",
    icon:         "👸",
    title: "Ultimate Curator",
    points:       1500,
    requirements: { count: 100 },
    tier: AchievementTier.Diamond,
  },

  comment_diverse: {
    category:     AchievementCategory.Comment,
    description:  "Comment on all 6 media types",
    icon:         "🎨",
    key:          "comment_diverse",
    points:       250,
    requirements: { diversity: true },
    title: "Well-Rounded Critic",
    tier:         AchievementTier.Gold,
  },

  suggestion_quality_25: {
    description:  "Have 25 suggestions accepted",
    category:     AchievementCategory.Suggestion,
    key:          "suggestion_quality_25",
    icon:         "💫",
    title: "Master Curator",
    points:       400,
    requirements: { count: 25 },
    tier: AchievementTier.Platinum,
  },

  comment_first_to_comment: {
    category:     AchievementCategory.Comment,
    description:  "Be the first to comment on 10 items",
    icon:         "🗨️",
    key:          "comment_first_to_comment",
    points:       200,
    requirements: { count: 10 },
    tier:         AchievementTier.Silver,
    title: "Discussion Starter",
  },

  comment_master: {
    category:     AchievementCategory.Comment,
    description:  "Leave 250 comments in the library",
    icon:         "📖",
    key:          "comment_master",
    points:       500,
    title: "Master Reviewer",
    requirements: { count: 250 },
    tier:         AchievementTier.Platinum,
  },

  suggestion_quality_5: {
    key: "suggestion_quality_5",
    title: "Quality Curator",
    description: "Have 5 suggestions accepted",
    category: AchievementCategory.Suggestion,
    tier: AchievementTier.Silver,
    icon: "🌟",
    points: 100,
    requirements: { count: 5 },
  },

  comment_novel: {
    category:     AchievementCategory.Comment,
    description:  "Write 3 comments with 2000+ characters",
    icon:         "📚",
    key:          "comment_novel",
    points:       500,
    requirements: { count: 3 },
    tier:         AchievementTier.Platinum,
    title:        "Novel Writer",
  },

  suggestion_quality_50: {
    key:          "suggestion_quality_50",
    description: "Have 50 suggestions accepted",
    title: "Grand Master",
    category:     AchievementCategory.Suggestion,
    icon: "🎖️",
    tier: AchievementTier.Platinum,
    points:       700,
    requirements: { count: 50 },
  },

  comment_reviewer: {
    description:  "Leave 10 comments in the library",
    category:     AchievementCategory.Comment,
    key:          "comment_reviewer",
    icon:         "✍️",
    title: "Reviewer",
    points:       50,
    requirements: { count: 10 },
    tier: AchievementTier.Bronze,
  },

  suggestion_renaissance: {
    description:  "Submit accepted suggestions across all 6 media types",
    category:     AchievementCategory.Suggestion,
    key:          "suggestion_renaissance",
    icon:         "🌈",
    title: "Renaissance Person",
    points:       400,
    requirements: { diversity: true },
    tier: AchievementTier.Gold,
  },

  comment_thoughtful: {
    category:     AchievementCategory.Comment,
    description:  "Comment on 50 different items",
    icon:         "💭",
    key:          "comment_thoughtful",
    points:       150,
    requirements: { uniqueItems: 50 },
    tier:         AchievementTier.Silver,
    title:        "Thoughtful Reviewer",
  },

  engagement_early_adopter: {
    category:     AchievementCategory.Engagement,
    description:  "Be among the first 10 users to join",
    icon:         "🌟",
    key:          "engagement_early_adopter",
    points:       1000,
    requirements: {},
    tier:         AchievementTier.Diamond,
    title: "Early Adopter",
  },
  // ========== LIKE ACHIEVEMENTS (12) ==========
  like_first: {
    description: "Like your first item in the library",
    key:          "like_first",
    category:     AchievementCategory.Like,
    title: "First Like",
    icon:         "❤️",
    points:       25,
    tier: AchievementTier.Bronze,
    requirements: { count: 1 },
  },
  engagement_founding_100: {
    category:     AchievementCategory.Engagement,
    description:  "Be among the first 100 users to join",
    icon:         "🎖️",
    key:          "engagement_founding_100",
    points:       500,
    requirements: {},
    tier:         AchievementTier.Gold,
    title:        "Founding Member",
  },
  like_mega_fan: {
    description: "Like 500 items in the library",
    key:          "like_mega_fan",
    category:     AchievementCategory.Like,
    title: "Mega Fan",
    icon:         "💗",
    points:       500,
    tier: AchievementTier.Platinum,
    requirements: { count: 500 },
  },
  engagement_founding_1000: {
    category:     AchievementCategory.Engagement,
    description:  "Be among the first 1000 users to join",
    icon:         "🚀",
    key:          "engagement_founding_1000",
    points:       200,
    requirements: {},
    tier:         AchievementTier.Silver,
    title:        "Pioneer",
  },
  like_super_fan: {
    key:          "like_super_fan",
    description: "Like 250 items in the library",
    title: "Super Fan",
    category:     AchievementCategory.Like,
    icon: "💝",
    tier: AchievementTier.Gold,
    points:       250,
    requirements: { count: 250 },
  },
  engagement_power_user: {
    category:     AchievementCategory.Engagement,
    description:  "Achieve Triple Threat 10 times",
    icon:         "💫",
    key:          "engagement_power_user",
    points:       750,
    requirements: { count: 10 },
    tier:         AchievementTier.Platinum,
    title:        "Power User",
  },

  like_legendary: {
    key:          "like_legendary",
    description: "Like 1000 items in the library",
    title: "Legendary Fan",
    category:     AchievementCategory.Like,
    icon: "💞",
    tier: AchievementTier.Diamond,
    points:       1000,
    requirements: { count: 1000 },
  },

  engagement_streak_100: {
    category:     AchievementCategory.Engagement,
    description:  "Login for 100 days in a row",
    icon:         "🏆",
    key:          "engagement_streak_100",
    points:       500,
    requirements: { streak: 100 },
    tier:         AchievementTier.Gold,
    title:        "Committed",
  },

  like_gamer: {
    key:          "like_gamer",
    description: "Like 50 games",
    title: "Gamer",
    category:     AchievementCategory.Like,
    icon: "🎮",
    tier: AchievementTier.Silver,
    points:       100,
    requirements: { count: 50 },
  },

  engagement_streak_30: {
    category:     AchievementCategory.Engagement,
    description:  "Login for 30 days in a row",
    icon:         "💪",
    key:          "engagement_streak_30",
    points:       250,
    requirements: { streak: 30 },
    tier:         AchievementTier.Silver,
    title:        "Dedicated",
  },

  like_music: {
    key:          "like_music",
    description: "Like 50 music albums",
    title: "Music Enthusiast",
    category:     AchievementCategory.Like,
    icon: "🎵",
    tier: AchievementTier.Silver,
    points:       100,
    requirements: { count: 50 },
  },

  engagement_streak_365: {
    category:     AchievementCategory.Engagement,
    description:  "Login for 365 days in a row",
    icon:         "⚡",
    key:          "engagement_streak_365",
    points:       2000,
    requirements: { streak: 365 },
    tier:         AchievementTier.Diamond,
    title:        "Unstoppable",
  },

  engagement_streak_7: {
    category:     AchievementCategory.Engagement,
    description:  "Login for 7 days in a row",
    icon:         "🔥",
    key:          "engagement_streak_7",
    points:       100,
    requirements: { streak: 7 },
    tier:         AchievementTier.Bronze,
    title:        "Daily Visitor",
  },

  like_binge: {
    key: "like_binge",
    title: "Binge Liker",
    description: "Like 20+ items in one day",
    category: AchievementCategory.Like,
    tier: AchievementTier.Silver,
    icon: "⚡",
    points: 150,
    requirements: { count: 20, dayRange: 1 },
  },

  engagement_triple_threat: {
    category:     AchievementCategory.Engagement,
    description:  "Submit a suggestion, like an item, and leave a comment in the same day",
    icon:         "🎯",
    key:          "engagement_triple_threat",
    points:       200,
    requirements: { dayRange: 1 },
    tier:         AchievementTier.Silver,
    title:        "Triple Threat",
  },

  engagement_veteran_180: {
    category:     AchievementCategory.Engagement,
    description:  "Have an account for 6 months",
    icon:         "📅",
    key:          "engagement_veteran_180",
    points:       150,
    requirements: { dayRange: 180 },
    tier:         AchievementTier.Silver,
    title:        "Seasoned",
  },

  engagement_veteran_1825: {
    category:     AchievementCategory.Engagement,
    description:  "Have an account for 5 years",
    icon:         "🌠",
    key:          "engagement_veteran_1825",
    points:       1500,
    requirements: { dayRange: 1825 },
    tier:         AchievementTier.Diamond,
    title:        "Legend",
  },

  engagement_veteran_30: {
    category:     AchievementCategory.Engagement,
    description:  "Have an account for 30 days",
    icon:         "⏰",
    key:          "engagement_veteran_30",
    points:       50,
    requirements: { dayRange: 30 },
    tier:         AchievementTier.Bronze,
    title:        "Veteran",
  },

  engagement_veteran_365: {
    category:     AchievementCategory.Engagement,
    description:  "Have an account for 1 year",
    icon:         "🎂",
    key:          "engagement_veteran_365",
    points:       300,
    requirements: { dayRange: 365 },
    tier:         AchievementTier.Gold,
    title:        "Longstanding",
  },

  engagement_veteran_730: {
    category:     AchievementCategory.Engagement,
    description:  "Have an account for 2 years",
    icon:         "🗓️",
    key:          "engagement_veteran_730",
    points:       600,
    requirements: { dayRange: 730 },
    tier:         AchievementTier.Platinum,
    title:        "Elder",
  },
  // ========== ENGAGEMENT ACHIEVEMENTS (15) ==========
  engagement_welcome: {
    category:     AchievementCategory.Engagement,
    description:  "Complete your profile setup",
    icon:         "👋",
    key:          "engagement_welcome",
    points:       25,
    requirements: {},
    tier:         AchievementTier.Bronze,
    title: "Welcome!",
  },

  report_accuracy_80: {
    category:     AchievementCategory.Report,
    description:  "Maintain 80%+ ACTION_TAKEN rate (minimum 10 reports)",
    icon:         "🎯",
    key:          "report_accuracy_80",
    points:       300,
    requirements: { count: 10, rate: 0.8 },
    tier:         AchievementTier.Gold,
    title:        "Sharp Eye",
  },

  report_accuracy_90: {
    category:     AchievementCategory.Report,
    description:  "Maintain 90%+ ACTION_TAKEN rate (minimum 10 reports)",
    icon:         "🦅",
    key:          "report_accuracy_90",
    points:       500,
    requirements: { count: 10, rate: 0.9 },
    tier:         AchievementTier.Platinum,
    title:        "Eagle Eye",
  },

  report_consistent: {
    category:     AchievementCategory.Report,
    description:  "Submit at least one report weekly for 4 weeks",
    icon:         "📆",
    key:          "report_consistent",
    points:       200,
    requirements: { count: 4 },
    tier:         AchievementTier.Silver,
    title:        "Consistent Guardian",
  },

  report_guardian: {
    category:     AchievementCategory.Report,
    description:  "Have 5 reports result in ACTION_TAKEN",
    icon:         "🛡️",
    key:          "report_guardian",
    points:       100,
    requirements: { count: 5 },
    tier:         AchievementTier.Silver,
    title:        "Guardian",
  },

  report_protector: {
    category:     AchievementCategory.Report,
    description:  "Have 10 reports result in ACTION_TAKEN",
    icon:         "⚔️",
    key:          "report_protector",
    points:       250,
    requirements: { count: 10 },
    tier:         AchievementTier.Gold,
    title:        "Protector",
  },

  report_vigilant: {
    category:     AchievementCategory.Report,
    description:  "Have 25 reports result in ACTION_TAKEN",
    icon:         "🔰",
    key:          "report_vigilant",
    points:       500,
    requirements: { count: 25 },
    tier:         AchievementTier.Platinum,
    title:        "Vigilant Protector",
  },

  report_volume: {
    category:     AchievementCategory.Report,
    description:  "Submit 50 reports (any status)",
    icon:         "📝",
    key:          "report_volume",
    points:       150,
    requirements: { count: 50 },
    tier:         AchievementTier.Silver,
    title:        "Dedicated Reporter",
  },
  // ========== REPORT ACHIEVEMENTS (8) ==========
  report_watchful: {
    category:     AchievementCategory.Report,
    description:  "Submit your first valid report (ACTION_TAKEN)",
    icon:         "👀",
    key:          "report_watchful",
    points:       50,
    requirements: { count: 1 },
    tier:         AchievementTier.Bronze,
    title:        "Watchful Eye",
  },
};

export const ACHIEVEMENT_LIST = Object.values(ACHIEVEMENTS);
