
import 'package:absenkuv3/Repository/Model/mJadwalShift.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter/material.dart';

abstract class PilihShiftV2Event {
  DataShift? dataShift;
}

class SetShift extends PilihShiftV2Event {
  SetShift(DataShift _dataShift) {
    dataShift = _dataShift;
  }
}

class DataShiftProgress extends DataShift{}

class initShift extends PilihShiftV2Event{}

class PilihShiftV2Bloc extends Bloc<PilihShiftV2Event, DataShift> {
  DataShift? init;
  PilihShiftV2Bloc(init) : super(init);

  @override
  Stream<DataShift> mapEventToState(PilihShiftV2Event event) async* {
    if (event is SetShift) {
      debugPrint('setShift');
      yield event.dataShift!;
    } else
      yield state;
  }
}
