part of 'payment_method_analytic_loader_bloc.dart';

@freezed
class PaymentMethodAnalyticLoaderState with _$PaymentMethodAnalyticLoaderState {
  const factory PaymentMethodAnalyticLoaderState({
    required PaymentMethodAnalytic paymentMethodAnalytic,
    required Option<AnalyticFailure> failureOptionPaymentMethodAnalytic,
    @Default(false) bool isFetching,
    required DateTime dateFrom,
    required DateTime dateTo,
  }) = _PaymentMethodAnalyticLoaderState;

  factory PaymentMethodAnalyticLoaderState.initial() =>
      PaymentMethodAnalyticLoaderState(
        paymentMethodAnalytic: PaymentMethodAnalytic.empty(),
        failureOptionPaymentMethodAnalytic: none(),
        dateFrom: DateTime.now(),
        dateTo: DateTime.now(),
      );
}
