/**
 * Repository Interface: IProtestRepository
 * 
 * Defines the contract for persisting and retrieving Protest entities.
 */

import type { Protest } from '../entities/Protest';

export interface IProtestRepository {
  /**
   * Find a protest by ID
   */
  findById(id: string): Promise<Protest | null>;

  /**
   * Find all protests for a race
   */
  findByRaceId(raceId: string): Promise<Protest[]>;

  /**
   * Find all protests filed by a specific driver
   */
  findByProtestingDriverId(driverId: string): Promise<Protest[]>;

  /**
   * Find all protests against a specific driver
   */
  findByAccusedDriverId(driverId: string): Promise<Protest[]>;

  /**
   * Find all pending protests (for steward review queue)
   */
  findPending(): Promise<Protest[]>;

  /**
   * Find all protests under review by a specific steward
   */
  findUnderReviewBy(stewardId: string): Promise<Protest[]>;

  /**
   * Save a new protest
   */
  create(protest: Protest): Promise<void>;

  /**
   * Update an existing protest
   */
  update(protest: Protest): Promise<void>;

  /**
   * Check if a protest exists
   */
  exists(id: string): Promise<boolean>;
}