part of 'report_bloc.dart';

@freezed
class ReportState with _$ReportState {
  factory ReportState({
    required String title,
    required DateTime startDate,
    required DateTime endDate,
    required String rangeDateFormatted,
    @Default(0) int selectedMenu,
  }) = _ReportState;

  factory ReportState.initial() => ReportState(
    title: 'Ringkasan Laporan Penjualan',
    startDate: DateTime.now().subtract(const Duration(days: 30)),
    endDate: DateTime.now(),
    rangeDateFormatted:
        '${DateTime.now().subtract(const Duration(days: 30)).toFormattedDate()} - ${DateTime.now().toFormattedDate()}',
  );
}
