import 'gravity_engine_method_channel.dart';
import 'gravity_engine_platform_interface.dart';

class GravityEngine {
  GravityEngine._();

  static Future<bool> initialize(String appId, String accessToken,
      String clientId, String channel, bool debug) {
    return GravityEnginePlatform.instance
        .initialize(appId, accessToken, clientId, channel, debug);
  }

  static Future<void> trackEvent(String eventName,
      {Map<String, dynamic>? eventProperties}) {
    return GravityEnginePlatform.instance
        .trackEvent(eventName, eventProperties: eventProperties);
  }

  static Future<void> trackPay(String orderNo, String itemName, int amountCent,
      String currency, PayType payType) {
    return GravityEnginePlatform.instance
        .trackPay(orderNo, itemName, amountCent, currency, payType);
  }

  static Future<void> login(String clientId) {
    return GravityEnginePlatform.instance.login(clientId);
  }

  static Future<void> logout() {
    return GravityEnginePlatform.instance.logout();
  }
}
