part of 'customer_loader_bloc.dart';

@freezed
class CustomerLoaderState with _$CustomerLoaderState {
  factory CustomerLoaderState({
    required List<Customer> customers,
    required Option<CustomerFailure> failureOrOption,
    Customer? selectedCustomer,
    @Default(false) bool isFetching,
    @Default(false) bool hasReachedMax,
    @Default(1) int page,
  }) = _CustomerLoaderState;

  factory CustomerLoaderState.initial() =>
      CustomerLoaderState(customers: [], failureOrOption: none());
}
