import 'package:bloc/bloc.dart';
import 'package:e_commerce_training/src/model/repository/app_repository.dart';
import 'package:equatable/equatable.dart';

part 'setting_account_state.dart';

class SettingAccountCubit extends Cubit<SettingAccountState> {
  final AppRepository repository;

  SettingAccountCubit(this.repository) : super(SettingAccountInitial());
  bool isSwitched = true;
  late bool isCheckBox = true;

  void changeSwitched(bool isSwitched) {
    emit(SettingAccountLoading());
    this.isSwitched = isSwitched;
    emit(SettingAccountInitial());
  }

  void changeCheckBox(bool bool) {
    emit(CheckBoxLoading(isCheckBox = !isCheckBox));
  }
}
