import { RacingDomainValidationError } from '../errors/RacingDomainError';

export class ScoringPresetId {
  private constructor(private readonly value: string) {}

  static create(value: string): ScoringPresetId {
    if (!value || value.trim().length === 0) {
      throw new RacingDomainValidationError('Scoring Preset ID cannot be empty');
    }
    return new ScoringPresetId(value.trim());
  }

  toString(): string {
    return this.value;
  }

  equals(other: ScoringPresetId): boolean {
    return this.value === other.value;
  }
}