import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'gravity_engine_method_channel.dart';

abstract class GravityEnginePlatform extends PlatformInterface {
  /// Constructs a GravityEnginePlatform.
  GravityEnginePlatform() : super(token: _token);

  static final Object _token = Object();

  static GravityEnginePlatform _instance = MethodChannelGravityEngine();

  /// The default instance of [GravityEnginePlatform] to use.
  ///
  /// Defaults to [MethodChannelGravityEngine].
  static GravityEnginePlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [GravityEnginePlatform] when
  /// they register themselves.
  static set instance(GravityEnginePlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<bool> initialize(String appId, String accessToken, String clientId,
      String channel, bool debug) {
    throw UnimplementedError('initialize() has not been implemented.');
  }

  Future<void> trackEvent(String eventName,
      {Map<String, dynamic>? eventProperties}) {
    throw UnimplementedError('trackEvent() has not been implemented.');
  }

  Future<void> trackPay(String orderNo, String itemName, int amountCent,
      String currency, PayType payType) {
    throw UnimplementedError('trackPay() has not been implemented.');
  }

  Future<void> trackAdLoadEvent(String? adUnionType, String? adPlacementId,
      String? adSourceId, String? adType, String? adnType) {
    throw UnimplementedError('trackAdLoadEvent() has not been implemented.');
  }

  Future<void> trackAdShowEvent(String? adUnionType, String? adPlacementId,
      String? adSourceId, String? adType, String? adnType, double? ecpm) {
    throw UnimplementedError('trackAdShowEvent() has not been implemented.');
  }

  Future<void> trackAdClickEvent(String? adUnionType, String? adPlacementId,
      String? adSourceId, String? adType, String? adnType, double? ecpm) {
    throw UnimplementedError('trackAdClickEvent() has not been implemented.');
  }

  Future<void> trackAdPlayStartEvent(String? adUnionType, String? adPlacementId,
      String? adSourceId, String? adType, String? adnType, double? ecpm) {
    throw UnimplementedError(
        'trackAdPlayStartEvent() has not been implemented.');
  }

  Future<void> trackAdPlayEndEvent(
      String? adUnionType,
      String? adPlacementId,
      String? adSourceId,
      String? adType,
      String? adnType,
      double? ecpm,
      int? duration,
      bool? isPlayOver) {
    throw UnimplementedError('trackAdPlayEndEvent() has not been implemented.');
  }

  Future<void> login(String clientId) {
    throw UnimplementedError('login() has not been implemented.');
  }

  Future<void> logout() {
    throw UnimplementedError('logout() has not been implemented.');
  }
}
