part of 'dashboard_analytic_loader_bloc.dart';

@freezed
class DashboardAnalyticLoaderState with _$DashboardAnalyticLoaderState {
  const factory DashboardAnalyticLoaderState({
    required DashboardAnalytic dashboardAnalytic,
    required Option<AnalyticFailure> failureOptionDashboardAnalytic,
    @Default(false) bool isFetching,
    required DateTime dateFrom,
    required DateTime dateTo,
  }) = _DashboardAnalyticLoaderState;

  factory DashboardAnalyticLoaderState.initial() =>
      DashboardAnalyticLoaderState(
        dashboardAnalytic: DashboardAnalytic.empty(),
        failureOptionDashboardAnalytic: none(),
        dateFrom: DateTime.now(),
        dateTo: DateTime.now(),
      );
}
