import { NumberDisplay } from './NumberDisplay';

export class RatingDisplay {
  /**
   * Formats a rating as a rounded number with thousands separators.
   * Example: 1234.56 -> "1,235"
   */
  static format(rating: number | null | undefined): string {
    if (rating === null || rating === undefined) return '—';
    return NumberDisplay.format(Math.round(rating));
  }
}
