import 'package:flyinsono/managers/interfaces/remedical.dart';
import 'package:flyinsono/rpc.dart';
import 'package:fis_common/js_plateform/js_platform.dart';
import 'package:get/get.dart';

class WindowChangeHelper {
  static const String _windowName = "Main";

  ///最小化
  static Future<void> onMinimize() async {
    await rpc.platform.minimizeWindow(_windowName);
  }

  ///最大化
  static Future<void> onMaximize() async {
    await rpc.platform.maximizeWindow(_windowName);
  }

  ///关闭
  static Future<void> onClose() async {
    await rpc.platform.closeWindow(_windowName);
  }

  ///开启拖拽
  static Future<void> onStartDrag() async {
    JSPlateForm.beginWindowDrag(_windowName);
  }

  ///结束拖拽
  static Future<void> onEndDrag() async {
    JSPlateForm.endWindowDrag(_windowName);
  }
}
