part of 'product_analytic_loader_bloc.dart';

@freezed
class ProductAnalyticLoaderState with _$ProductAnalyticLoaderState {
  const factory ProductAnalyticLoaderState({
    required ProductAnalytic productAnalytic,
    required Option<AnalyticFailure> failureOptionProductAnalytic,
    @Default(false) bool isFetching,
    required DateTime dateFrom,
    required DateTime dateTo,
  }) = _ProductAnalyticLoaderState;

  factory ProductAnalyticLoaderState.initial() => ProductAnalyticLoaderState(
    productAnalytic: ProductAnalytic.empty(),
    failureOptionProductAnalytic: none(),
    dateFrom: DateTime.now(),
    dateTo: DateTime.now(),
  );
}
