export type MediaType = 'tv_show' | 'movie';

export type CuratorCategory = 'Definitely Like' | 'Might Like' | 'Questionable' | 'Will Not Like';

export interface CuratorOutput {
  title: string;
  explanation: string;
  category: CuratorCategory;
}

export type RecommendationStatus = 'pending' | 'running' | 'done' | 'error';

export interface Recommendation {
  id: string;
  title: string;
  main_prompt: string;
  liked_shows: string;
  disliked_shows: string;
  themes: string;
  media_type: MediaType;
  use_web_search: boolean;
  recommendations: CuratorOutput[] | null;
  status: RecommendationStatus;
  created_at: string;
}

export interface RecommendationSummary {
  id: string;
  title: string;
  status: RecommendationStatus;
  media_type: MediaType;
  created_at: string;
}

export interface FeedbackEntry {
  id: string;
  item_name: string;
  stars: number;
  feedback: string;
  created_at: string;
}

export type PipelineStage = 'interpreter' | 'retrieval' | 'ranking' | 'curator' | 'complete';
export type SSEStatus = 'start' | 'done' | 'error';

export interface SSEEvent {
  stage: PipelineStage;
  status: SSEStatus;
  data?: unknown;
}

export type StageStatus = 'pending' | 'running' | 'done' | 'error';

export type StageMap = Record<Exclude<PipelineStage, 'complete'>, StageStatus>;
