import 'package:be_happy/domain/entities/payment_card.dart';

import '../../domain/entities/tariff.dart';

enum TariffSheetStatus { initial, loading, success, failure }

class TariffSheetState {
  final TariffSheetStatus status;
  final List<Tariff> tariffs;
  final String? errorMessage;
  final PaymentCard? selectedCard;
  final bool isInsurance;
  final int userBalance;
  final bool useBalance ;

  TariffSheetState({
    this.status = TariffSheetStatus.initial,
    this.tariffs = const [],
    this.selectedCard,
    this.isInsurance = false,
    this.errorMessage,
    this.userBalance = 0,
    this.useBalance = false,
  });

  TariffSheetState copyWith({
    TariffSheetStatus? status,
    List<Tariff>? tariffs,
    PaymentCard? selectedCard,
    String? errorMessage,
    bool? isInsurance,
    int? userBalance,
    bool? useBalance,

  }) => TariffSheetState(
    status: status ?? this.status,
    tariffs: tariffs ?? this.tariffs,
    selectedCard: selectedCard ?? this.selectedCard,
    useBalance: useBalance ?? this.useBalance,
    userBalance: userBalance ?? this.userBalance,
    isInsurance: isInsurance ?? this.isInsurance,
    errorMessage: errorMessage ?? this.errorMessage,
  );
}
