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

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

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

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

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