part of 'order_loader_bloc.dart';

@freezed
class OrderLoaderState with _$OrderLoaderState {
  const factory OrderLoaderState({
    required List<Order> orders,
    required Option<OrderFailure> failureOptionOrder,
    String? status,
    String? search,
    @Default(false) bool isFetching,
    @Default(false) bool hasReachedMax,
    @Default(1) int page,
  }) = _OrderLoaderState;

  factory OrderLoaderState.initial() =>
      OrderLoaderState(orders: [], failureOptionOrder: none());
}
