export interface AiChatMessage {
  id: string;
  role: "user" | "assistant";
  content: string;
  timestamp: string;
}

export interface AiChatRequest {
  message: string;
  context?: {
    page?: string;
    topic_id?: number;
    subject_id?: number;
  };
  history?: AiChatMessage[];
}

export interface AiChatResponse {
  message: string;
  suggestions?: string[];
}

export interface AiInsight {
  id: string;
  title: string;
  description: string;
  type: "positive" | "warning" | "info";
  metric?: string;
  value?: string;
}

export interface AiAlert {
  id: string;
  title: string;
  description: string;
  severity: "low" | "medium" | "high";
  student_id?: number;
  student_name?: string;
  action_url?: string;
}

export interface AiTip {
  title: string;
  content: string;
  category: string;
}

export interface AiSearchResult {
  type: "page" | "content" | "action";
  title: string;
  description: string;
  url?: string;
  relevance: number;
}

export interface AiGenerationRequest {
  type: "course" | "exam" | "rubric" | "assignment";
  subject_id?: number;
  topic_id?: number;
  parameters: Record<string, unknown>;
}

export interface AiGenerationResult {
  content: unknown;
  model_used: string;
  generation_time_ms: number;
}

export interface AiGradingResult {
  scores: Record<string, number>;
  overall_score: number;
  feedback: string;
  suggestions: string[];
}

export interface AiRiskAssessment {
  level: "low" | "medium" | "high";
  reasons: string[];
  score: number;
}

export interface AiBatchOptimization {
  suggestion: string;
  impact: "high" | "medium" | "low";
  details: string;
}

export interface AiReportNarrativeRequest {
  report_type: string;
  data: Record<string, unknown>;
}
