import 'package:get/get.dart';

import '../defines.dart';

class AppState extends StateModuleBase {
  final _busy = false.obs;

  /// 程序处理是否忙碌中
  bool get busy => _busy.value;
  set busy(bool v) {
    _busy.value = v;
    if (v) {
      // PromptBox.loading();
    } else {
      // PromptBox.dismiss();
    }
  }

  void setBusy(String text) {
    _busy.value = true;
    // PromptBox.loading(text);
  }

  void cancelBusy() => busy = false;

  @override
  Future<void> acceptPersistenceJson(Map<String, dynamic> map) async {
    //
  }

  @override
  Map<String, dynamic> toPersistenceJson() {
    return {};
  }
}
