part of 'home_bloc.dart';

class HomeState extends Equatable {
  const HomeState({
    required this.isLoading,
    required this.paginationLoading,
    required this.page,
    this.ordersList,
    this.pageCount,
    this.banners,
    required this.selectedStatus,
  });

  final bool isLoading;
  final bool paginationLoading;
  final int page;
  final int? pageCount;
  final OrdersListResponse? ordersList;
  final String selectedStatus;
  final List<BannerResponse>? banners;

  HomeState copyWith({
    bool? isLoading,
    bool? paginationLoading,
    int? page,
    int? pageCount,
    OrdersListResponse? ordersList,
    String? selectedStatus,
    List<BannerResponse>? banners,
  }) {
    return HomeState(
      isLoading: isLoading ?? this.isLoading,
      page: page ?? this.page,
      pageCount: pageCount ?? this.pageCount,
      paginationLoading: paginationLoading ?? this.paginationLoading,
      ordersList: ordersList ?? this.ordersList,
      selectedStatus: selectedStatus ?? this.selectedStatus,
      banners: banners ?? this.banners,
    );
  }

  @override
  List<Object?> get props => [
    isLoading,
    paginationLoading,
    page,
    ordersList,
    pageCount,
    selectedStatus,
    banners,
  ];
}
