part of 'analytics_date_picker_bloc.dart';

final class AnalyticsDatePickerState extends Equatable {
  AnalyticsDatePickerState({
    DateTime? monthlyDate,
    DateTime? yearlyDate,
  })  : monthlyDate = monthlyDate ?? DateTime.now(),
        yearlyDate = yearlyDate ?? DateTime.now();

  final DateTime monthlyDate;
  final DateTime yearlyDate;

  AnalyticsDatePickerState copyWith({
    DateTime? monthlyDate,
    DateTime? yearlyDate,
  }) {
    return AnalyticsDatePickerState(
      monthlyDate: monthlyDate ?? this.monthlyDate,
      yearlyDate: yearlyDate ?? this.yearlyDate,
    );
  }

  @override
  List<Object?> get props => [monthlyDate, yearlyDate];
}
