import { DecimalPipe, PercentPipe } from '@angular/common';
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { RatingSummary } from '../../../../../../core/products/models/product-engagement.model';
import { TranslatePipe } from '../../../../../../i18n/translate.pipe';
import { StarsComponent } from '../stars/stars.component';

@Component({
  selector: 'app-rating-summary',
  standalone: true,
  imports: [DecimalPipe, PercentPipe, StarsComponent, TranslatePipe],
  templateUrl: './rating-summary.component.html',
  styleUrls: ['./rating-summary.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class RatingSummaryComponent {
  @Input() summary: RatingSummary | null = null;
  @Input() loading = false;
}
