part of 'category_analytic_loader_bloc.dart';

@freezed
class CategoryAnalyticLoaderState with _$CategoryAnalyticLoaderState {
  const factory CategoryAnalyticLoaderState({
    required CategoryAnalytic categoryAnalytic,
    required Option<AnalyticFailure> failureOptionCategoryAnalytic,
    @Default(false) bool isFetching,
    required DateTime dateFrom,
    required DateTime dateTo,
  }) = _CategoryAnalyticLoaderState;

  factory CategoryAnalyticLoaderState.initial() => CategoryAnalyticLoaderState(
    categoryAnalytic: CategoryAnalytic.empty(),
    failureOptionCategoryAnalytic: none(),
    dateFrom: DateTime.now(),
    dateTo: DateTime.now(),
  );
}
