import 'package:pigeon/pigeon.dart';

@ConfigurePigeon(
  PigeonOptions(
    dartOut: 'lib/pigeons/core_api.g.dart',
    kotlinOut: 'android/app/src/main/kotlin/app/xixi/nomo/CoreApi.g.kt',
    swiftOut: 'ios/Runner/CoreApi.g.swift',
    dartPackageName: 'app.xixi.nomo', // 👈 关键
  ),
)
@HostApi()
abstract class CoreApi {
  @async
  String? getApps();
  String? getSystemLocale();
  bool? connect(
    String sessionId,
    int socksPort,
    String tunnelConfig,
    String configJson,
  );
  bool? disconnect();
  String? getRemoteIp();
  String? getAdvertisingId();
  bool? moveTaskToBack();
  bool? isConnected();
  String? getSimInfo();
  bool? reconnect();
  String? getChannel();
}

// 如果你需要让原生通知 Flutter 事件变化，可用 EventChannelApi
@EventChannelApi()
abstract class CoreChangeEventApi {
  String onEventChange();
}
