import 'dart:async';

import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'package:wz_location_plugin/config/location_option.dart';
import 'package:wz_location_plugin/models/wayz_geocode_response.dart';
import 'package:wz_location_plugin/models/wayz_reverse_geocode_response.dart';

import 'wz_location_plugin_method_channel.dart';
import 'wz_scenario_http_api.dart';

abstract class WzLocationPluginPlatform extends PlatformInterface {
  WzLocationPluginPlatform() : super(token: _token);

  static final Object _token = Object();

  static WzLocationPluginPlatform _instance = MethodChannelWzLocationPlugin();

  static WzLocationPluginPlatform get instance => _instance;

  static set instance(WzLocationPluginPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }



  Future<String?> getPlatformVersion() {
    throw UnimplementedError('getPlatformVersion() has not been implemented.');
  }

  Future<void> setApiKey(String apiKey) async {
    throw UnimplementedError('setApiKey() has not been implemented.');
  }

  Future<void> updatePrivacyShow(bool hasContains, bool hasShow) async {
    throw UnimplementedError('updatePrivacyShow() has not been implemented.');
  }

  Future<void> updatePrivacyAgree(bool hasAgree) async {
    throw UnimplementedError('updatePrivacyAgree() has not been implemented.');
  }

  Future<void> setLocationOption(WzLocationOption locationOption) async {
    throw UnimplementedError('setLocationOption() has not been implemented.');
  }

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

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

  /// Native location/error events from [EventChannel] `wz_location_plugin_stream`.
  ///
  /// Payload maps use `"type": "location"` or `"type": "error"` (see plugin README / integration docs).
  /// Values may be null for `"location"` payloads from Android.
  Stream<Map<String, Object?>> get locationStream {
    throw UnimplementedError('locationStream has not been implemented.');
  }

  Future<WzGeocodeResponse> geocode({
    required String address,
    String? city,
  })async {
    throw UnimplementedError('geocode has not been implemented.');
  }

  Future<WzReverseGeocodeResponse> reverseGeocode(
      {required String asset,
      required double longitude,
      required double latitude,
      String? responseSprf,
      String? spatialReference,
      String? source,
      double? accuracy})async {
    throw UnimplementedError('reverseGeocode has not been implemented.');
  }

  Future<List<WzGeocodeResponse>> searchPoiByKeyword(
      {required String name,
      String? city,
      String? cityCode,
      required int pageIndex,
      required int pageSize}) async{
    throw UnimplementedError('searchPoiByKeyword has not been implemented.');
  }

  Future<List<WzGeocodeResponse>> searchPoiNearby(
      {required String location,
      required int radiusMeters,
      String? keywords,
      String? category,
      String? orderBy,
      required int pageIndex,
      required int pageSize})async {
    throw UnimplementedError('searchPoiByKeyword has not been implemented.');
  }
}
