import type { AchievementProps } from './entities/Achievement';

// Predefined achievements for drivers
export const DRIVER_ACHIEVEMENTS: Omit<AchievementProps, 'createdAt'>[] = [
  {
    id: 'first-race',
    name: 'First Steps',
    description: 'Complete your first race',
    category: 'driver',
    rarity: 'common',
    points: 10,
    requirements: [{ type: 'races_completed', value: 1, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'ten-races',
    name: 'Getting Started',
    description: 'Complete 10 races',
    category: 'driver',
    rarity: 'common',
    points: 25,
    requirements: [{ type: 'races_completed', value: 10, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'fifty-races',
    name: 'Regular Racer',
    description: 'Complete 50 races',
    category: 'driver',
    rarity: 'uncommon',
    points: 50,
    requirements: [{ type: 'races_completed', value: 50, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'hundred-races',
    name: 'Veteran',
    description: 'Complete 100 races',
    category: 'driver',
    rarity: 'rare',
    points: 100,
    requirements: [{ type: 'races_completed', value: 100, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'first-win',
    name: 'Victory Lane',
    description: 'Win your first race',
    category: 'driver',
    rarity: 'uncommon',
    points: 50,
    requirements: [{ type: 'wins', value: 1, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'ten-wins',
    name: 'Serial Winner',
    description: 'Win 10 races',
    category: 'driver',
    rarity: 'rare',
    points: 100,
    requirements: [{ type: 'wins', value: 10, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'first-podium',
    name: 'Podium Finisher',
    description: 'Finish on the podium',
    category: 'driver',
    rarity: 'common',
    points: 25,
    requirements: [{ type: 'podiums', value: 1, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'clean-streak-5',
    name: 'Clean Racer',
    description: 'Complete 5 consecutive races without incidents',
    category: 'driver',
    rarity: 'uncommon',
    points: 50,
    requirements: [{ type: 'consecutive_clean', value: 5, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'clean-streak-10',
    name: 'Safety First',
    description: 'Complete 10 consecutive races without incidents',
    category: 'driver',
    rarity: 'rare',
    points: 100,
    requirements: [{ type: 'consecutive_clean', value: 10, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'championship-win',
    name: 'Champion',
    description: 'Win a championship',
    category: 'driver',
    rarity: 'epic',
    points: 200,
    requirements: [{ type: 'championships_won', value: 1, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'triple-crown',
    name: 'Triple Crown',
    description: 'Win 3 championships',
    category: 'driver',
    rarity: 'legendary',
    points: 500,
    requirements: [{ type: 'championships_won', value: 3, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'elite-driver',
    name: 'Elite Driver',
    description: 'Reach Elite driver rating',
    category: 'driver',
    rarity: 'epic',
    points: 250,
    requirements: [{ type: 'rating_threshold', value: 90, operator: '>=' }],
    isSecret: false,
  },
];

// Predefined achievements for stewards
export const STEWARD_ACHIEVEMENTS: Omit<AchievementProps, 'createdAt'>[] = [
  {
    id: 'first-protest',
    name: 'Justice Served',
    description: 'Handle your first protest',
    category: 'steward',
    rarity: 'common',
    points: 15,
    requirements: [{ type: 'protests_handled', value: 1, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'ten-protests',
    name: 'Fair Judge',
    description: 'Handle 10 protests',
    category: 'steward',
    rarity: 'uncommon',
    points: 50,
    requirements: [{ type: 'protests_handled', value: 10, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'fifty-protests',
    name: 'Senior Steward',
    description: 'Handle 50 protests',
    category: 'steward',
    rarity: 'rare',
    points: 100,
    requirements: [{ type: 'protests_handled', value: 50, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'hundred-protests',
    name: 'Chief Steward',
    description: 'Handle 100 protests',
    category: 'steward',
    rarity: 'epic',
    points: 200,
    requirements: [{ type: 'protests_handled', value: 100, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'event-steward-10',
    name: 'Event Official',
    description: 'Steward 10 race events',
    category: 'steward',
    rarity: 'uncommon',
    points: 50,
    requirements: [{ type: 'events_stewarded', value: 10, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'trusted-steward',
    name: 'Trusted Steward',
    description: 'Achieve highly-trusted status',
    category: 'steward',
    rarity: 'rare',
    points: 150,
    requirements: [{ type: 'trust_threshold', value: 75, operator: '>=' }],
    isSecret: false,
  },
];

// Predefined achievements for admins
export const ADMIN_ACHIEVEMENTS: Omit<AchievementProps, 'createdAt'>[] = [
  {
    id: 'first-league',
    name: 'League Founder',
    description: 'Create your first league',
    category: 'admin',
    rarity: 'common',
    points: 25,
    requirements: [{ type: 'leagues_managed', value: 1, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'first-season',
    name: 'Season Organizer',
    description: 'Complete your first full season',
    category: 'admin',
    rarity: 'uncommon',
    points: 50,
    requirements: [{ type: 'seasons_completed', value: 1, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'five-seasons',
    name: 'Experienced Organizer',
    description: 'Complete 5 seasons',
    category: 'admin',
    rarity: 'rare',
    points: 100,
    requirements: [{ type: 'seasons_completed', value: 5, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'ten-seasons',
    name: 'Veteran Organizer',
    description: 'Complete 10 seasons',
    category: 'admin',
    rarity: 'epic',
    points: 200,
    requirements: [{ type: 'seasons_completed', value: 10, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'large-league',
    name: 'Community Builder',
    description: 'Manage a league with 50+ members',
    category: 'admin',
    rarity: 'rare',
    points: 150,
    requirements: [{ type: 'members_managed', value: 50, operator: '>=' }],
    isSecret: false,
  },
  {
    id: 'huge-league',
    name: 'Empire Builder',
    description: 'Manage a league with 100+ members',
    category: 'admin',
    rarity: 'epic',
    points: 300,
    requirements: [{ type: 'members_managed', value: 100, operator: '>=' }],
    isSecret: false,
  },
];

// Community achievements (for all roles)
export const COMMUNITY_ACHIEVEMENTS: Omit<AchievementProps, 'createdAt'>[] = [
  {
    id: 'community-leader',
    name: 'Community Leader',
    description: 'Achieve community leader trust level',
    category: 'community',
    rarity: 'legendary',
    points: 500,
    requirements: [{ type: 'trust_threshold', value: 90, operator: '>=' }],
    isSecret: false,
  },
];
