part of 'clock_manual_bloc.dart';

@immutable
class ClockManualState {
  final List<StaffContact> confirmedStaffContacts;
  final List<StaffContact> ongoingStaffContacts;
  final int selectedTabIndex;
  final bool inLoading;
  final String? errorMessage;

  final Map<String, ValueNotifier<int>> timers ;

  const ClockManualState(
      {required this.confirmedStaffContacts,
      required this.ongoingStaffContacts,
      this.inLoading = false,
      this.errorMessage,
      this.timers = const {},
      this.selectedTabIndex = 0});

  copyWith({
    List<StaffContact>? confirmedStaffContacts,
    List<StaffContact>? ongoingStaffContacts,
    bool? inLoading,
    String? errorMessage,
    int? selectedTabIndex,
    Map<String, ValueNotifier<int>>? timers,
  }) {
    return ClockManualState(
      timers: timers ?? this.timers,
      confirmedStaffContacts:
          confirmedStaffContacts ?? this.confirmedStaffContacts,
      ongoingStaffContacts: ongoingStaffContacts ?? this.ongoingStaffContacts,
      inLoading: inLoading ?? this.inLoading,
      errorMessage: errorMessage ?? this.errorMessage,
      selectedTabIndex: selectedTabIndex ?? this.selectedTabIndex,
    );
  }
}
