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

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

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

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

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