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

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

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