part of 'sales_loader_bloc.dart';

@freezed
class SalesLoaderState with _$SalesLoaderState {
  const factory SalesLoaderState({
    required SalesAnalytic sales,
    required Option<AnalyticFailure> failureOptionSales,
    @Default(false) bool isFetching,
    required DateTime dateFrom,
    required DateTime dateTo,
  }) = _SalesLoaderState;

  factory SalesLoaderState.initial() => SalesLoaderState(
    sales: SalesAnalytic.empty(),
    failureOptionSales: none(),
    dateFrom: DateTime.now(),
    dateTo: DateTime.now(),
  );
}
