
import 'package:rasadyar_chicken/presentation/pages/steward/root/logic.dart';
import 'package:rasadyar_core/core.dart';

enum WidelyUsedType { edit, normal }

class WidelyUsedLogic extends GetxController {
  Rx<WidelyUsedType> type = WidelyUsedType.normal.obs;
  StewardRootLogic rootLogic = Get.find<StewardRootLogic>();


  @override
  void onReady() {
    super.onReady();
  }

  @override
  void onClose() {
    // TODO: implement onClose
    super.onClose();
  }

  bool isOnEdit() => type.value == WidelyUsedType.edit;

  void toggleType() {
    fLog(rootLogic.widelyUsedList);
    if (type.value == WidelyUsedType.edit) {
      type.value = WidelyUsedType.normal;
    } else {
      type.value = WidelyUsedType.edit;
    }
  }
}
