import 'package:equatable/equatable.dart';
import 'package:krow_domain/krow_domain.dart';

enum TaxFormsStatus { initial, loading, success, failure }

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

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

  TaxFormsState copyWith({
    TaxFormsStatus? status,
    List<TaxForm>? 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];
}
