/** Core domain types for Cloud Reader */

export interface Bookmark {
  id: string;
  ebook: number;
  ebook_title: string;
  epub_cfi: string;
  chapter_index: number;
  chapter_title: string;
  page: number;
  location_text: string;
  content: string;
  highlight_color?: string;
  created_at: string;
  updated_at: string;
}

export interface CreateMarkerPayload {
  ebook: number;
  epub_cfi: string;
  chapter_index: number;
  chapter_title?: string;
  location_text?: string;
  content?: string;
  highlight_color?: string;
}

export interface PaginatedResponse<T> {
  count: number;
  next: string | null;
  previous: string | null;
  results: T[];
}

export interface MarkerEntry {
  id: string;
  ebook_id: number;
  ebook_title: string;
  epub_cfi: string;
  chapter_index: number;
  chapter_title: string;
  page: number;
  location_text: string;
  content: string;
  highlight_color?: string;
  created_at: string;
  updated_at: string;
}

export interface MarkersByBook {
  ebookId: number;
  ebookTitle: string;
  markers: MarkerEntry[];
}
