part of 'product_loader_bloc.dart';

@freezed
class ProductLoaderEvent with _$ProductLoaderEvent {
  const factory ProductLoaderEvent.getProduct({
    String? categoryId,
    String? search, // Added search parameter
    bool? forceRefresh, // Kept for compatibility but ignored
  }) = _GetProduct;

  const factory ProductLoaderEvent.loadMore({
    String? categoryId,
    String? search,
  }) = _LoadMore;

  const factory ProductLoaderEvent.refresh() = _Refresh;

  const factory ProductLoaderEvent.searchProduct({
    String? query,
    String? categoryId,
  }) = _SearchProduct;

  const factory ProductLoaderEvent.getDatabaseStats() = _GetDatabaseStats;

  const factory ProductLoaderEvent.clearCache() = _ClearCache;
}
