part of 'stamp_bloc.dart';

abstract class StampState extends Equatable {
  const StampState();

  @override
  List<Object> get props => [];
}

class StampInitial extends StampState {}

class StampLoading extends StampState {}

class StampFailure extends StampState {
  final String errorString;
  StampFailure({required this.errorString});
}

class StampSuccess<Stamp> extends StampState {
  final List<Stamp>? items;
  final int? page;
  final bool? hasReachedMax;

  const StampSuccess({this.items, this.page, this.hasReachedMax});

  StampSuccess copyWith({List<Stamp>? items, int? page, bool? hasReachedMax}) {
    return StampSuccess(
      items: items ?? this.items,
      page: page ?? this.page,
      hasReachedMax: hasReachedMax ?? this.hasReachedMax,
    );
  }
}
