import { ChangeDetectionStrategy, Component, input } from '@angular/core';
import { TranslatePipe } from '../../../../../i18n/translate.pipe';

export interface ProductHealthItem {
  labelKey: string;
  done: boolean;
}

/** Reusable checklist + completion meter, fed real per-item booleans from AdminProductsFacade.health() - never invents its own data. */
@Component({
  selector: 'app-product-health-widget',
  standalone: true,
  imports: [TranslatePipe],
  templateUrl: './product-health-widget.component.html',
  styleUrl: './product-health-widget.component.scss',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ProductHealthWidgetComponent {
  readonly items = input.required<ProductHealthItem[]>();
  readonly completionPercent = input.required<number>();
  readonly compact = input(false);
}
