import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pharmacy_mobile/blocs/caches/categorylist/categorylist_cache_event.dart';
import 'package:pharmacy_mobile/blocs/caches/categorylist/categorylist_cache_state.dart';

class CategoryListBloc extends Bloc<CategoryListCacheEvent, CategoryListCacheState> {
  CategoryListBloc() : super(CategoryListCacheState([])) {
    on<CategoryListCacheSet>((event, emit) {
      emit(CategoryListCacheState(event.value));
    });
    on<CategoryListCacheGet>((event, emit) {
      emit(state);
    });
  }
}
