import { Watcher, WatcherItem, WatcherSummary, WatcherTracker } from "../types";

export interface TrackerDefinition {
  key: WatcherTracker;
  label: string;
  cliSiteKey: string;
  supportsRemoveBookmark: boolean;
}

export interface BookmarkRecord {
  pageURL: string;
  isVR?: boolean;
  title: string;
  backgroundImage?: string | null;
  downloadURL?: string | null;
  removeToken?: string | null;
  size?: string | null;
  seeders?: number | null;
  leechers?: number | null;
}

export interface ScraperRunPaths {
  runDir: string;
  cookiesPath: string;
  bookmarksPath: string;
  torrentDir: string;
}

export interface WatcherListItem extends Omit<Watcher, "cookieEncrypted"> {
  hasCookie: boolean;
}

export interface EnrichedWatcherItem extends WatcherItem {
  progress: number;
  state?: string;
}

export interface WatcherSummaryResponse extends WatcherSummary {
  watchers: Array<Pick<Watcher, "id" | "tracker" | "trackerLabel" | "enabled" | "lastRunAt" | "lastSuccessAt" | "nextRunAt" | "totalImported">>;
}
