import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pharmacy_mobile/blocs/language/language_event.dart';
import 'package:pharmacy_mobile/blocs/language/language_state.dart';

class LanguageBloc extends Bloc<LanguageEvent, LanguageState> {
  LanguageBloc() : super(LanguageState('')) {
    on<LanguageSetValue>((event, emit) {
      emit(LanguageState(event.value));
    });
    on<LanguageGetValue>((event, emit) {
      emit(state);
    });
  }
}
