/**
 * TypeScript interfaces for the Cloud Reader reader module.
 * Reading view, settings, chapters, and progress types.
 */

export interface ChapterSummary {
  id: number;
  book: number;
  title: string;
  number: number;
}

export interface ChapterDetail extends ChapterSummary {
  content: string;
  created_at: string;
  updated_at: string;
}

export interface ReadingSettings {
  font_family: "sans-serif" | "serif" | "monospace";
  font_size: number;
  line_height: number;
  margin_width: number;
  background_color: string;
  text_color: string;
  brightness: number;
  orientation_lock: "auto" | "portrait" | "landscape";
  theme: "sepia" | "dark" | "light" | "paper";
  created_at: string;
  updated_at: string;
}

export type ThemePreset = ReadingSettings["theme"];
export type FontFamily = ReadingSettings["font_family"];
export type OrientationLock = ReadingSettings["orientation_lock"];

export interface ReadingProgress {
  id: number;
  book: number;
  current_chapter: number;
  current_position: number;
  percentage: number;
  epub_location: string;
  updated_at: string;
}