// 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';

class MAMultiPointOverlayRenderer extends MAOverlayRenderer  {
  //region constants
  static const String name__ = 'MAMultiPointOverlayRenderer';

  @override
  final String tag__ = 'amap_map_fluttify';

  
  //endregion

  //region creators
  static Future<MAMultiPointOverlayRenderer> create__({ bool init = true /* ios only */ }) async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod(
      'ObjectFactory::createMAMultiPointOverlayRenderer',
      {'init': init}
    );
    return AmapMapFluttifyIOSAs<MAMultiPointOverlayRenderer>(__result__)!;
  }
  
  static Future<List<MAMultiPointOverlayRenderer>> create_batch__(int length, { bool init = true /* ios only */ }) async {
    assert(true);
    final __result_batch__ = await  kAmapMapFluttifyChannel.invokeListMethod(
      'ObjectFactory::create_batchMAMultiPointOverlayRenderer',
      {'length': length, 'init': init}
    );
    return __result_batch__
        ?.map((it) => AmapMapFluttifyIOSAs<MAMultiPointOverlayRenderer>(it))
        .where((element) => element !=null)
        .cast<MAMultiPointOverlayRenderer>()
        .toList() ?? <MAMultiPointOverlayRenderer>[];
  }
  
  //endregion

  //region getters
  Future<UIImage?> get_icon() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMultiPointOverlayRenderer::get_icon", {'__this__': this});
    return AmapMapFluttifyIOSAs<UIImage>(__result__);
  }
  
  Future<CGSize?> get_pointSize() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMultiPointOverlayRenderer::get_pointSize", {'__this__': this});
    return AmapMapFluttifyIOSAs<CGSize>(__result__);
  }
  
  Future<CGPoint?> get_anchor() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMultiPointOverlayRenderer::get_anchor", {'__this__': this});
    return AmapMapFluttifyIOSAs<CGPoint>(__result__);
  }
  
  Future<MAMultiPointOverlay?> get_multiPointOverlay() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MAMultiPointOverlayRenderer::get_multiPointOverlay", {'__this__': this});
    return AmapMapFluttifyIOSAs<MAMultiPointOverlay>(__result__);
  }
  
  //endregion

  //region setters
  Future<void> set_delegate(MAMultiPointOverlayRendererDelegate? delegate) async {
    await kAmapMapFluttifyChannel.invokeMethod('MAMultiPointOverlayRenderer::set_delegate', <String, dynamic>{'__this__': this, "delegate": delegate});
  }
  
  Future<void> set_icon(UIImage? icon) async {
    await kAmapMapFluttifyChannel.invokeMethod('MAMultiPointOverlayRenderer::set_icon', <String, dynamic>{'__this__': this, "icon": icon});
  }
  
  Future<void> set_pointSize(CGSize? pointSize) async {
    await kAmapMapFluttifyChannel.invokeMethod('MAMultiPointOverlayRenderer::set_pointSize', <String, dynamic>{'__this__': this, "pointSize": pointSize});
  }
  
  Future<void> set_anchor(CGPoint? anchor) async {
    await kAmapMapFluttifyChannel.invokeMethod('MAMultiPointOverlayRenderer::set_anchor', <String, dynamic>{'__this__': this, "anchor": anchor});
  }
  
  //endregion

  //region methods
  
  Future<MAMultiPointOverlayRenderer?> initWithMultiPointOverlay(MAMultiPointOverlay? multiPointOverlay) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: MAMultiPointOverlayRenderer@$refId::initWithMultiPointOverlay([])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('MAMultiPointOverlayRenderer::initWithMultiPointOverlay', {"multiPointOverlay": multiPointOverlay, "__this__": this});
  
  
    // handle native call
  
  
    return AmapMapFluttifyIOSAs<MAMultiPointOverlayRenderer>(__result__);
  }
  
  //endregion

  @override
  String toString() {
    return 'MAMultiPointOverlayRenderer{refId: $refId, runtimeType: $runtimeType, tag__: $tag__}';
  }
}

extension MAMultiPointOverlayRenderer_Batch on List<MAMultiPointOverlayRenderer?> {
  String? get refId {
    if (isEmpty) return null;
    return first?.refId;
  }

  //region getters
  Future<List<UIImage?>> get_icon_batch() async {
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod("MAMultiPointOverlayRenderer::get_icon_batch", [for (final __item__ in this) {'__this__': __item__}]);
    return (resultBatch as List).map((__result__) => AmapMapFluttifyIOSAs<UIImage>(__result__)).cast<UIImage?>().toList();
  }
  
  Future<List<CGSize?>> get_pointSize_batch() async {
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod("MAMultiPointOverlayRenderer::get_pointSize_batch", [for (final __item__ in this) {'__this__': __item__}]);
    return (resultBatch as List).map((__result__) => AmapMapFluttifyIOSAs<CGSize>(__result__)).cast<CGSize?>().toList();
  }
  
  Future<List<CGPoint?>> get_anchor_batch() async {
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod("MAMultiPointOverlayRenderer::get_anchor_batch", [for (final __item__ in this) {'__this__': __item__}]);
    return (resultBatch as List).map((__result__) => AmapMapFluttifyIOSAs<CGPoint>(__result__)).cast<CGPoint?>().toList();
  }
  
  Future<List<MAMultiPointOverlay?>> get_multiPointOverlay_batch() async {
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod("MAMultiPointOverlayRenderer::get_multiPointOverlay_batch", [for (final __item__ in this) {'__this__': __item__}]);
    return (resultBatch as List).map((__result__) => AmapMapFluttifyIOSAs<MAMultiPointOverlay>(__result__)).cast<MAMultiPointOverlay?>().toList();
  }
  
  //endregion

  //region setters
  Future<void> set_icon_batch(List<UIImage?> icon) async {
    await kAmapMapFluttifyChannel.invokeMethod('MAMultiPointOverlayRenderer::set_icon_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "icon": icon[__i__]}]);
  
  
  }
  
  Future<void> set_pointSize_batch(List<CGSize?> pointSize) async {
    await kAmapMapFluttifyChannel.invokeMethod('MAMultiPointOverlayRenderer::set_pointSize_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "pointSize": pointSize[__i__]}]);
  
  
  }
  
  Future<void> set_anchor_batch(List<CGPoint?> anchor) async {
    await kAmapMapFluttifyChannel.invokeMethod('MAMultiPointOverlayRenderer::set_anchor_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "anchor": anchor[__i__]}]);
  
  
  }
  
  //endregion

  //region methods
  
  Future<List<MAMultiPointOverlayRenderer?>> initWithMultiPointOverlay_batch(List<MAMultiPointOverlay?> multiPointOverlay) async {
    assert(true);
  
    // invoke native method
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod('MAMultiPointOverlayRenderer::initWithMultiPointOverlay_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"multiPointOverlay": multiPointOverlay[__i__], "__this__": this[__i__]}]);
  
  
    return (resultBatch as List).map((__result__) => AmapMapFluttifyIOSAs<MAMultiPointOverlayRenderer>(__result__)).cast<MAMultiPointOverlayRenderer?>().toList();
  }
  
  //endregion
}