import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import { Product } from '../../../../core/products/models/product-domain.model';
import { ProductCardComponent } from '../../../../components/product-card/product-card.component';
import { TranslatePipe } from '../../../../i18n/translate.pipe';

@Component({
  selector: 'app-search-empty-results',
  standalone: true,
  imports: [ProductCardComponent, TranslatePipe],
  templateUrl: './search-empty-results.component.html',
  styleUrls: ['./search-empty-results.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class SearchEmptyResultsComponent {
  @Input() popularCategories: Array<{ id: string | number; label: string }> = [];
  @Input() popularSearches: string[] = [];
  @Input() recommendedProducts: Product[] = [];

  @Output() resetFilters = new EventEmitter<void>();
  @Output() popularCategorySelected = new EventEmitter<string | number>();
  @Output() popularSearchSelected = new EventEmitter<string>();
  @Output() productSelected = new EventEmitter<Product>();
  @Output() productAddToCart = new EventEmitter<{ product: Product; event: Event }>();
}
