part of 'product_loader_bloc.dart';

@freezed
class ProductLoaderState with _$ProductLoaderState {
  factory ProductLoaderState({
    required List<Product> products,
    required Option<ProductFailure> failureOptionProduct,
    @Default(false) bool hasReachedMax,
    @Default(1) int page,
    @Default(false) bool isLoadingMore,
    String? searchQuery,
    String? categoryId,
  }) = _ProductLoaderState;

  factory ProductLoaderState.initial() =>
      ProductLoaderState(products: [], failureOptionProduct: none());
}
