part of 'dashboard_store_operation_list_cubit.dart';

enum DashboardStoreOperationListStatus { initial, loading, success, failure }

class DashboardStoreOperationListState extends Equatable {
  final DashboardStoreOperationListStatus status;
  final String? error;
  final List<OperationModel> operations;

  const DashboardStoreOperationListState({
    required this.status,
    this.error,
    this.operations = const [],
  });

  @override
  List<Object?> get props => [status, error, operations];

  DashboardStoreOperationListState copyWith({
    DashboardStoreOperationListStatus? status,
    String? error,
    List<OperationModel>? operations,
  }) {
    return DashboardStoreOperationListState(
      status: status ?? this.status,
      error: error,
      operations: operations ?? this.operations,
    );
  }
}
