import 'package:get/get.dart';

import '../../../../data/consts/event_report.dart';
import '../../../../handler/event_handler.dart';

mixin StepGenDerLogic {
  final tag = "StepGenDerLogic";

  final RxnInt _currentGender = RxnInt(null);

  int? get currentGender => _currentGender.value;

  changeGender(int genderValue) {
    _currentGender.value =
        _currentGender.value == genderValue
            ? (genderValue == 1 ? 2 : 1)
            : genderValue;

    if (currentGender == 1) {
      EventHandler.report(EventId.event_01004);
    } else if (currentGender == 2) {
      EventHandler.report(EventId.event_01005);
    }

  }
}
