import Cocoa
import FlutterMacOS

@main
class AppDelegate: FlutterAppDelegate {
  // 托盘常驻:关闭窗口只隐藏到托盘,不终止 app(window_manager preventClose + hide
  // 负责隐藏;此处 false 兜底,确保即便窗口真关闭 app 也留在托盘)。
  override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
    return false
  }

  override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
    return true
  }
}
