part of 'dashboard_task_list_cubit.dart';

enum DashboardTaskListStatus { initial, loading, success, failure }

class DashboardTaskListState extends Equatable {
  final DashboardTaskListStatus status;
  final List<TaskModel> tasks;
  final String? errorMessage;

  const DashboardTaskListState({
    this.status = DashboardTaskListStatus.initial,
    this.tasks = const [],
    this.errorMessage,
  });

  DashboardTaskListState copyWith({
    DashboardTaskListStatus? status,
    List<TaskModel>? tasks,
    String? errorMessage,
  }) {
    return DashboardTaskListState(
      status: status ?? this.status,
      tasks: tasks ?? this.tasks,
      errorMessage: errorMessage ?? this.errorMessage,
    );
  }

  @override
  List<Object?> get props => [status, tasks, errorMessage];
}
