import type { Difficulty } from "./game";
import type { PlatformId } from "./platform";
import type { Score } from "./scoring";

export type TrafficSource = "player" | "automated";

export interface LeaderboardEntry {
  id: string;
  nickname: string;
  platform: PlatformId;
  difficulty: Difficulty;
  score: Score;
  grade: string;
  commandCount: number;
  durationMs: number;
  scenarioTitle: string;
  identityKind?: "github";
  githubUserId?: string;
  githubLogin?: string;
  trafficSource?: TrafficSource;
  timestamp: number;
}

export interface HallOfFameEntry {
  nickname: string;
  platform: PlatformId;
  compositeScore: number;
  scores: {
    easy?: number;
    medium?: number;
    hard?: number;
  };
}
