// ignore_for_file: non_constant_identifier_names, camel_case_types, missing_return, unused_import, unused_local_variable, dead_code, unnecessary_cast
//////////////////////////////////////////////////////////
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
//////////////////////////////////////////////////////////

import 'dart:typed_data';

import 'package:amap_map_fluttify/src/ios/ios.export.g.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import 'package:foundation_fluttify/foundation_fluttify.dart';
import 'package:core_location_fluttify/core_location_fluttify.dart';
import 'package:amap_core_fluttify/amap_core_fluttify.dart';
import 'package:amap_search_fluttify/amap_search_fluttify.dart';
import 'package:amap_location_fluttify/amap_location_fluttify.dart';

extension Annotation on MAMapView {
  //region getters
  Future<List<dynamic>?> get_annotations() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMapView::get_annotations", {'__this__': this});
    return (__result__ as List?)?.cast<dynamic>();
  }
  
  Future<List<dynamic>?> get_selectedAnnotations() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMapView::get_selectedAnnotations", {'__this__': this});
    return (__result__ as List?)?.cast<dynamic>();
  }
  
  Future<CGRect?> get_annotationVisibleRect() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMapView::get_annotationVisibleRect", {'__this__': this});
    return AmapMapFluttifyIOSAs<CGRect>(__result__);
  }
  
  //endregion

  //region setters
  Future<void> set_selectedAnnotations(List<dynamic>? selectedAnnotations) async {
    await kAmapMapFluttifyChannel.invokeMethod('MAMapView::set_selectedAnnotations', <String, dynamic>{'__this__': this, "selectedAnnotations": selectedAnnotations});
  }
  
  //endregion

  //region methods
  
  Future<void> addAnnotation(MAAnnotation? annotation) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: MAMapView@$refId::addAnnotation([])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('MAMapView::addAnnotation', {"annotation": annotation, "__this__": this});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  
  Future<void> addAnnotations(List<dynamic>? annotations) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: MAMapView@$refId::addAnnotations([])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('MAMapView::addAnnotations', {"annotations": annotations, "__this__": this});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  
  Future<void> removeAnnotation(MAAnnotation? annotation) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: MAMapView@$refId::removeAnnotation([])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('MAMapView::removeAnnotation', {"annotation": annotation, "__this__": this});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  
  Future<void> removeAnnotations(List<dynamic>? annotations) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: MAMapView@$refId::removeAnnotations([])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('MAMapView::removeAnnotations', {"annotations": annotations, "__this__": this});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  
  Future<MAAnnotationView?> viewForAnnotation(MAAnnotation? annotation) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: MAMapView@$refId::viewForAnnotation([])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('MAMapView::viewForAnnotation', {"annotation": annotation, "__this__": this});
  
  
    // handle native call
  
  
    return AmapMapFluttifyIOSAs<MAAnnotationView>(__result__);
  }
  
  
  Future<MAAnnotationView?> dequeueReusableAnnotationViewWithIdentifier(String? identifier) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: MAMapView@$refId::dequeueReusableAnnotationViewWithIdentifier([\'identifier\':$identifier])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('MAMapView::dequeueReusableAnnotationViewWithIdentifier', {"identifier": identifier, "__this__": this});
  
  
    // handle native call
  
  
    return AmapMapFluttifyIOSAs<MAAnnotationView>(__result__);
  }
  
  
  Future<void> selectAnnotation_animated(MAAnnotation? annotation, bool? animated) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: MAMapView@$refId::selectAnnotation([\'animated\':$animated])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('MAMapView::selectAnnotation_animated', {"annotation": annotation, "animated": animated, "__this__": this});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  
  Future<void> deselectAnnotation_animated(MAAnnotation? annotation, bool? animated) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: MAMapView@$refId::deselectAnnotation([\'animated\':$animated])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('MAMapView::deselectAnnotation_animated', {"annotation": annotation, "animated": animated, "__this__": this});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  
  Future<void> showAnnotations_animated(List<dynamic>? annotations, bool? animated) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: MAMapView@$refId::showAnnotations([\'animated\':$animated])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('MAMapView::showAnnotations_animated', {"annotations": annotations, "animated": animated, "__this__": this});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  
  Future<void> showAnnotations_edgePadding_animated(List<dynamic>? annotations, UIEdgeInsets? insets, bool? animated) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: MAMapView@$refId::showAnnotations([\'animated\':$animated])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('MAMapView::showAnnotations_edgePadding_animated', {"annotations": annotations, "insets": insets, "animated": animated, "__this__": this});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  //endregion
}