import 'package:bloc/bloc.dart';
import 'package:absenkuv3/Repository/Model/mChekpoint.dart';

// Event
abstract class SelectedJadwalPatroliEvent {}

class UpdateSelectedJadwal extends SelectedJadwalPatroliEvent {
  final JadwalChekpoint? selectedJadwalChekpoint;

  UpdateSelectedJadwal(this.selectedJadwalChekpoint);
}

// Bloc
class SelectedJadwalPatroliBloc extends Bloc<SelectedJadwalPatroliEvent, JadwalChekpoint?> {
  SelectedJadwalPatroliBloc() : super(null);

  @override
  Stream<JadwalChekpoint?> mapEventToState(SelectedJadwalPatroliEvent event) async* {
    if (event is UpdateSelectedJadwal) {
      yield event.selectedJadwalChekpoint;
    }
  }
}
