export interface TrackDefinition {
  slug: string;
  name: string;
  description: string;
  longDesc: string;
  icon: string;
  color: string;
  gradient: string;
  difficulty: number;
  estimatedHours: number;
  skills: string[];
  companies: string[];
  order: number;
}

export const TRAINING_TRACKS: TrackDefinition[] = [
  {
    slug: "prompt-engineering",
    name: "Prompt Engineering",
    description: "Master the art of writing effective prompts for AI systems",
    longDesc: "Learn to craft precise, effective prompts that elicit accurate and useful responses from AI models. Practice the core skill required by every AI training company.",
    icon: "✍️",
    color: "violet",
    gradient: "from-violet-500 to-purple-600",
    difficulty: 2,
    estimatedHours: 8,
    skills: ["Prompt Design", "Instruction Following", "Context Setting", "Output Control"],
    companies: ["Outlier AI", "Scale AI", "Alignerr", "DataAnnotation"],
    order: 1,
  },
  {
    slug: "rlhf-ranking",
    name: "RLHF Ranking",
    description: "Compare and rank AI responses to train reward models",
    longDesc: "Practice Reinforcement Learning from Human Feedback tasks — the backbone of ChatGPT and modern AI alignment. Compare AI outputs and rank them by quality.",
    icon: "⚖️",
    color: "blue",
    gradient: "from-blue-500 to-cyan-600",
    difficulty: 2,
    estimatedHours: 6,
    skills: ["Comparative Ranking", "Quality Assessment", "Preference Labeling", "Reward Signal"],
    companies: ["Outlier AI", "Scale AI", "Anthropic", "OpenAI"],
    order: 2,
  },
  {
    slug: "response-evaluation",
    name: "AI Response Evaluation",
    description: "Score and critique AI-generated responses with precision",
    longDesc: "Develop expert-level skills in evaluating AI responses for accuracy, helpfulness, safety, and quality. The most common task type across all AI training platforms.",
    icon: "🔍",
    color: "emerald",
    gradient: "from-emerald-500 to-teal-600",
    difficulty: 2,
    estimatedHours: 10,
    skills: ["Quality Scoring", "Rubric Application", "Critical Analysis", "Feedback Writing"],
    companies: ["Outlier AI", "Handshake AI", "Scale AI", "Surge AI"],
    order: 3,
  },
  {
    slug: "data-annotation",
    name: "Data Annotation",
    description: "Label, tag, and annotate datasets for AI training",
    longDesc: "Master structured data labeling workflows used to train computer vision, NLP, and multimodal AI models. Includes text, image, and entity annotation.",
    icon: "🏷️",
    color: "orange",
    gradient: "from-orange-500 to-amber-600",
    difficulty: 1,
    estimatedHours: 6,
    skills: ["Text Labeling", "Entity Tagging", "Classification", "Structured Annotation"],
    companies: ["Scale AI", "DataAnnotation", "Appen", "Lionbridge"],
    order: 4,
  },
  {
    slug: "toxicity-detection",
    name: "Toxicity Detection",
    description: "Identify harmful, offensive, and policy-violating content",
    longDesc: "Train on real-world content moderation scenarios. Learn to identify subtle forms of harmful content including hate speech, misinformation, and policy violations.",
    icon: "🛡️",
    color: "red",
    gradient: "from-red-500 to-rose-600",
    difficulty: 3,
    estimatedHours: 7,
    skills: ["Content Moderation", "Policy Understanding", "Nuance Detection", "Safety Evaluation"],
    companies: ["Meta", "Scale AI", "Surge AI", "Outlier AI"],
    order: 5,
  },
  {
    slug: "factual-verification",
    name: "AI Fact Checking",
    description: "Verify factual accuracy and detect hallucinations in AI output",
    longDesc: "Develop skills to identify AI hallucinations, factual errors, and misleading claims. Critical skill for evaluating GPT-4, Claude, and Gemini outputs.",
    icon: "✅",
    color: "green",
    gradient: "from-green-500 to-emerald-600",
    difficulty: 3,
    estimatedHours: 8,
    skills: ["Fact Verification", "Source Checking", "Hallucination Detection", "Claim Analysis"],
    companies: ["Outlier AI", "Alignerr", "Scale AI", "DataAnnotation"],
    order: 6,
  },
  {
    slug: "sentiment-classification",
    name: "Sentiment Classification",
    description: "Classify emotional tone and intent in text",
    longDesc: "Label text for sentiment, emotion, intent, and tone. One of the most fundamental NLP annotation tasks used across every major AI training platform.",
    icon: "💭",
    color: "pink",
    gradient: "from-pink-500 to-rose-500",
    difficulty: 1,
    estimatedHours: 4,
    skills: ["Sentiment Analysis", "Emotion Labeling", "Intent Classification", "Tone Detection"],
    companies: ["DataAnnotation", "Appen", "Scale AI", "Surge AI"],
    order: 7,
  },
  {
    slug: "ai-writing-improvement",
    name: "AI Writing Improvement",
    description: "Rewrite and improve weak AI-generated content",
    longDesc: "Learn to identify weaknesses in AI writing and craft improved versions. Practice the editing and rewriting tasks required by writing-focused AI projects.",
    icon: "✏️",
    color: "indigo",
    gradient: "from-indigo-500 to-violet-600",
    difficulty: 2,
    estimatedHours: 9,
    skills: ["Rewriting", "Style Improvement", "Clarity Enhancement", "Instruction Following"],
    companies: ["Outlier AI", "Alignerr", "DataAnnotation"],
    order: 8,
  },
  {
    slug: "coding-evaluation",
    name: "Coding Evaluation",
    description: "Review, debug, and evaluate AI-generated code",
    longDesc: "Evaluate AI-generated code for correctness, efficiency, security, and style. High-paying track for developers with programming knowledge.",
    icon: "💻",
    color: "cyan",
    gradient: "from-cyan-500 to-blue-600",
    difficulty: 4,
    estimatedHours: 12,
    skills: ["Code Review", "Bug Detection", "Performance Analysis", "Security Review"],
    companies: ["Outlier AI", "Scale AI", "Alignerr", "DataAnnotation"],
    order: 9,
  },
  {
    slug: "chatbot-evaluation",
    name: "Chatbot Evaluation",
    description: "Assess AI conversational quality and coherence",
    longDesc: "Evaluate multi-turn AI conversations for coherence, helpfulness, persona consistency, and safety. Simulate Outlier AI chatbot projects.",
    icon: "🤖",
    color: "teal",
    gradient: "from-teal-500 to-cyan-600",
    difficulty: 2,
    estimatedHours: 7,
    skills: ["Conversation Analysis", "Coherence Rating", "Persona Evaluation", "Safety Checking"],
    companies: ["Outlier AI", "Handshake AI", "Scale AI"],
    order: 10,
  },
  {
    slug: "bias-detection",
    name: "AI Bias Detection",
    description: "Identify bias, stereotypes, and unfair representations",
    longDesc: "Detect subtle biases in AI outputs including gender, racial, cultural, and political bias. Critical for responsible AI development.",
    icon: "⚡",
    color: "yellow",
    gradient: "from-yellow-500 to-amber-500",
    difficulty: 3,
    estimatedHours: 8,
    skills: ["Bias Identification", "Fairness Analysis", "Stereotype Detection", "DEI Evaluation"],
    companies: ["Anthropic", "Scale AI", "Surge AI", "Outlier AI"],
    order: 11,
  },
  {
    slug: "search-relevance",
    name: "Search Relevance",
    description: "Judge if search results match user queries",
    longDesc: "Rate the relevance of search results and AI-generated answers to user queries. Used by search engines and AI assistants to improve result quality.",
    icon: "🔎",
    color: "slate",
    gradient: "from-slate-500 to-gray-600",
    difficulty: 2,
    estimatedHours: 5,
    skills: ["Relevance Judgment", "Query Understanding", "Result Ranking", "Needs Assessment"],
    companies: ["Appen", "Lionbridge", "Scale AI", "Telus International"],
    order: 12,
  },
  {
    slug: "translation-review",
    name: "Translation Review",
    description: "Evaluate and improve AI-generated translations",
    longDesc: "Review machine translations for accuracy, fluency, and cultural appropriateness. Ideal for multilingual candidates.",
    icon: "🌐",
    color: "blue",
    gradient: "from-blue-400 to-indigo-500",
    difficulty: 3,
    estimatedHours: 8,
    skills: ["Translation Quality", "Fluency Assessment", "Cultural Accuracy", "Terminology Review"],
    companies: ["Appen", "Lionbridge", "DataAnnotation", "Scale AI"],
    order: 13,
  },
  {
    slug: "ai-safety-evaluation",
    name: "AI Safety Evaluation",
    description: "Test AI systems for harmful and dangerous outputs",
    longDesc: "Perform red-teaming and safety evaluation on AI systems. Identify jailbreaks, harmful outputs, and safety failures. Growing field with premium pay.",
    icon: "🔐",
    color: "red",
    gradient: "from-red-600 to-orange-600",
    difficulty: 4,
    estimatedHours: 10,
    skills: ["Red Teaming", "Safety Testing", "Policy Compliance", "Adversarial Prompting"],
    companies: ["Anthropic", "OpenAI", "Scale AI", "Surge AI"],
    order: 14,
  },
  {
    slug: "image-annotation",
    name: "Image Annotation",
    description: "Label and annotate images for computer vision AI",
    longDesc: "Practice bounding box drawing, semantic segmentation, image classification, and visual question answering tasks for computer vision models.",
    icon: "🖼️",
    color: "purple",
    gradient: "from-purple-500 to-violet-600",
    difficulty: 2,
    estimatedHours: 6,
    skills: ["Object Detection", "Image Classification", "Segmentation", "Visual Description"],
    companies: ["Scale AI", "Appen", "DataAnnotation", "Telus International"],
    order: 15,
  },
  {
    slug: "grammar-quality",
    name: "Grammar & Language Quality",
    description: "Assess writing quality, grammar, and linguistic clarity",
    longDesc: "Evaluate AI-generated text for grammar, style, readability, and linguistic quality. Foundation skill for all writing and content evaluation projects.",
    icon: "📝",
    color: "emerald",
    gradient: "from-emerald-400 to-green-500",
    difficulty: 1,
    estimatedHours: 4,
    skills: ["Grammar Checking", "Style Evaluation", "Readability", "Clarity Assessment"],
    companies: ["Outlier AI", "DataAnnotation", "Alignerr", "Appen"],
    order: 16,
  },
  {
    slug: "human-feedback",
    name: "Human Feedback Tasks",
    description: "Provide rich human feedback to improve AI behavior",
    longDesc: "Learn to write detailed, actionable human feedback that helps AI systems improve. Combines evaluation, explanation, and structured feedback writing.",
    icon: "💬",
    color: "violet",
    gradient: "from-violet-400 to-purple-500",
    difficulty: 2,
    estimatedHours: 7,
    skills: ["Feedback Writing", "Critique Skills", "Improvement Suggestions", "Rubric Following"],
    companies: ["Outlier AI", "Anthropic", "Alignerr", "Scale AI"],
    order: 17,
  },
  {
    slug: "conversation-simulation",
    name: "AI Conversation Simulation",
    description: "Simulate realistic AI chat interactions for training data",
    longDesc: "Create and evaluate multi-turn conversations that simulate real user-AI interactions. Used to train ChatGPT-style assistants.",
    icon: "💬",
    color: "teal",
    gradient: "from-teal-400 to-emerald-500",
    difficulty: 3,
    estimatedHours: 8,
    skills: ["Dialogue Creation", "Persona Simulation", "Conversation Flow", "Natural Language"],
    companies: ["Outlier AI", "DataAnnotation", "Scale AI"],
    order: 18,
  },
  {
    slug: "audio-transcription",
    name: "Audio Transcription Review",
    description: "Review and correct AI-generated audio transcriptions",
    longDesc: "Evaluate and correct automatic speech recognition output. Identify errors in transcription, punctuation, and speaker attribution.",
    icon: "🎧",
    color: "orange",
    gradient: "from-orange-400 to-amber-500",
    difficulty: 2,
    estimatedHours: 5,
    skills: ["Transcription Review", "Audio Processing", "Accuracy Verification", "Speaker ID"],
    companies: ["Appen", "Lionbridge", "DataAnnotation", "Telus International"],
    order: 19,
  },
  {
    slug: "math-science-eval",
    name: "Math & Science Evaluation",
    description: "Evaluate AI reasoning on math and science problems",
    longDesc: "Assess AI-generated solutions to math, physics, chemistry, and logic problems. High-value track for STEM candidates. Premium rates on all platforms.",
    icon: "🧮",
    color: "blue",
    gradient: "from-blue-500 to-violet-600",
    difficulty: 5,
    estimatedHours: 15,
    skills: ["Mathematical Reasoning", "Scientific Accuracy", "Step-by-Step Verification", "Logic Analysis"],
    companies: ["Outlier AI", "Scale AI", "Alignerr", "DataAnnotation"],
    order: 20,
  },
];

export function getTrack(slug: string): TrackDefinition | undefined {
  return TRAINING_TRACKS.find((t) => t.slug === slug);
}

export const TRACK_COLOR_MAP: Record<string, { bg: string; text: string; border: string; badge: string }> = {
  violet: { bg: "bg-violet-50",  text: "text-violet-700",  border: "border-violet-200",  badge: "bg-violet-100 text-violet-700" },
  blue:   { bg: "bg-blue-50",    text: "text-blue-700",    border: "border-blue-200",    badge: "bg-blue-100 text-blue-700" },
  emerald:{ bg: "bg-emerald-50", text: "text-emerald-700", border: "border-emerald-200", badge: "bg-emerald-100 text-emerald-700" },
  orange: { bg: "bg-orange-50",  text: "text-orange-700",  border: "border-orange-200",  badge: "bg-orange-100 text-orange-700" },
  red:    { bg: "bg-red-50",     text: "text-red-700",     border: "border-red-200",     badge: "bg-red-100 text-red-700" },
  green:  { bg: "bg-green-50",   text: "text-green-700",   border: "border-green-200",   badge: "bg-green-100 text-green-700" },
  pink:   { bg: "bg-pink-50",    text: "text-pink-700",    border: "border-pink-200",    badge: "bg-pink-100 text-pink-700" },
  indigo: { bg: "bg-indigo-50",  text: "text-indigo-700",  border: "border-indigo-200",  badge: "bg-indigo-100 text-indigo-700" },
  cyan:   { bg: "bg-cyan-50",    text: "text-cyan-700",    border: "border-cyan-200",    badge: "bg-cyan-100 text-cyan-700" },
  teal:   { bg: "bg-teal-50",    text: "text-teal-700",    border: "border-teal-200",    badge: "bg-teal-100 text-teal-700" },
  yellow: { bg: "bg-yellow-50",  text: "text-yellow-700",  border: "border-yellow-200",  badge: "bg-yellow-100 text-yellow-700" },
  slate:  { bg: "bg-slate-100",  text: "text-slate-600",   border: "border-slate-200",   badge: "bg-slate-200 text-slate-700" },
  purple: { bg: "bg-purple-50",  text: "text-purple-700",  border: "border-purple-200",  badge: "bg-purple-100 text-purple-700" },
  amber:  { bg: "bg-amber-50",   text: "text-amber-700",   border: "border-amber-200",   badge: "bg-amber-100 text-amber-700" },
};
