import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pharmacy_mobile/blocs/caches/typelist/typelist_cache_event.dart';
import 'package:pharmacy_mobile/blocs/caches/typelist/typelist_cache_state.dart';

class TypeListBloc extends Bloc<TypeListCacheEvent, TypeListCacheState> {
  TypeListBloc() : super(TypeListCacheState([])) {
    on<TypeListCacheSet>((event, emit) {
      emit(TypeListCacheState(event.value));
    });
    on<TypeListCacheGet>((event, emit) {
      emit(state);
    });
  }
}
