part of 'category_loader_bloc.dart';

@freezed
class CategoryLoaderState with _$CategoryLoaderState {
  factory CategoryLoaderState({
    required List<Category> categories,
    required Option<CategoryFailure> failureOptionCategory,
    @Default(false) bool hasReachedMax,
    @Default(1) int page,
    @Default(false) bool isLoadingMore,
    String? searchQuery,
  }) = _CategoryLoaderState;

  factory CategoryLoaderState.initial() =>
      CategoryLoaderState(categories: [], failureOptionCategory: none());
}
