import 'package:absenkuv3/Repository/Model/mFilter.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

abstract class FilterBottomSheetEvent{}

class setFilterBottomSheet extends FilterBottomSheetEvent{
  ModelFilter? modelFilter;
  setFilterBottomSheet(this.modelFilter);
}

abstract class FilterBottomSheetState{}

class setFilterSuccess extends FilterBottomSheetState{
  ModelFilter? modelFilter;
  setFilterSuccess(this.modelFilter);
}

class FilterProgress extends FilterBottomSheetState{}

class FilterBottomSheetBloc extends Bloc<FilterBottomSheetEvent, FilterBottomSheetState>{
  ModelFilter? modelFilterDataAbsensi;

  FilterBottomSheetBloc(FilterBottomSheetState initialState) : super(initialState);

  @override
  Stream<FilterBottomSheetState> mapEventToState(FilterBottomSheetEvent event) async*{
    if(event is setFilterBottomSheet){
      yield setFilterSuccess(event.modelFilter);
    }
  }

}