import 'package:equatable/equatable.dart';
import '../../../domain/entities/tax_form_entity.dart';

enum TaxFormsStatus { initial, loading, success, failure }

class TaxFormsState extends Equatable {
  final TaxFormsStatus status;
  final List<TaxFormEntity> forms;
  final String? errorMessage;

  const TaxFormsState({
    this.status = TaxFormsStatus.initial,
    this.forms = const <TaxFormEntity>[],
    this.errorMessage,
  });

  TaxFormsState copyWith({
    TaxFormsStatus? status,
    List<TaxFormEntity>? forms,
    String? errorMessage,
  }) {
    return TaxFormsState(
      status: status ?? this.status,
      forms: forms ?? this.forms,
      errorMessage: errorMessage ?? this.errorMessage,
    );
  }

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