// Shared types between main and renderer processes

export interface VendorPrice {
  id: string;
  platform: 'eldorado' | 'playerauctions';
  sellerName: string;
  pricePerMillion: number;
  timestamp: Date;
  url?: string;
}

export interface PriceIndex {
  timestamp: Date;
  lowestPrice: number;
  platform: string;
  sellerName: string;
  allPrices: VendorPrice[];
}

export interface PriceAlert {
  id: string;
  type: 'below' | 'above';
  threshold: number;
  enabled: boolean;
}

export interface WebSocketMessage {
  type: 'price_update' | 'connection_status' | 'error' | 'history_data' | 'get_history' | 'subscribe';
  data: any;
}

export interface HistoricalData {
  range: string;
  from: Date;
  to: Date;
  prices: VendorPrice[];
}

export interface ConnectionStatus {
  connected: boolean;
  lastUpdate?: Date;
  error?: string;
}
