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

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

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

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

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