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

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

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

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

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