// 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 MACustomBuildingOverlayOption extends MAMultiPoint with MAAnnotation, MAOverlay {
  //region constants
  static const String name__ = 'MACustomBuildingOverlayOption';

  @override
  final String tag__ = 'amap_map_fluttify';

  
  //endregion

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

  //region getters
  Future<double?> get_height() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MACustomBuildingOverlayOption::get_height", {'__this__': this});
    return __result__;
  }
  
  Future<double?> get_heightScale() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MACustomBuildingOverlayOption::get_heightScale", {'__this__': this});
    return __result__;
  }
  
  Future<UIColor?> get_topColor() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MACustomBuildingOverlayOption::get_topColor", {'__this__': this});
    return AmapMapFluttifyIOSAs<UIColor>(__result__);
  }
  
  Future<UIColor?> get_sideColor() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MACustomBuildingOverlayOption::get_sideColor", {'__this__': this});
    return AmapMapFluttifyIOSAs<UIColor>(__result__);
  }
  
  Future<bool?> get_visibile() async {
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod("MACustomBuildingOverlayOption::get_visibile", {'__this__': this});
    return __result__;
  }
  
  //endregion

  //region setters
  Future<void> set_height(double? height) async {
    await kAmapMapFluttifyChannel.invokeMethod('MACustomBuildingOverlayOption::set_height', <String, dynamic>{'__this__': this, "height": height});
  }
  
  Future<void> set_heightScale(double? heightScale) async {
    await kAmapMapFluttifyChannel.invokeMethod('MACustomBuildingOverlayOption::set_heightScale', <String, dynamic>{'__this__': this, "heightScale": heightScale});
  }
  
  Future<void> set_topColor(UIColor? topColor) async {
    await kAmapMapFluttifyChannel.invokeMethod('MACustomBuildingOverlayOption::set_topColor', <String, dynamic>{'__this__': this, "topColor": topColor});
  }
  
  Future<void> set_sideColor(UIColor? sideColor) async {
    await kAmapMapFluttifyChannel.invokeMethod('MACustomBuildingOverlayOption::set_sideColor', <String, dynamic>{'__this__': this, "sideColor": sideColor});
  }
  
  Future<void> set_visibile(bool? visibile) async {
    await kAmapMapFluttifyChannel.invokeMethod('MACustomBuildingOverlayOption::set_visibile', <String, dynamic>{'__this__': this, "visibile": visibile});
  }
  
  //endregion

  //region methods
  
  static Future<MACustomBuildingOverlayOption?> optionWithCoordinates_count(List<CLLocationCoordinate2D>? coords, int? count) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: MACustomBuildingOverlayOption::optionWithCoordinates([\'count\':$count])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('MACustomBuildingOverlayOption::optionWithCoordinates_count', {"coords": coords, "count": count});
  
  
    // handle native call
  
  
    return AmapMapFluttifyIOSAs<MACustomBuildingOverlayOption>(__result__);
  }
  
  
  Future<bool?> setOptionWithCoordinates_count(List<CLLocationCoordinate2D>? coords, int? count) async {
    // print log
    if (fluttifyLogEnabled) {
      debugPrint('fluttify-dart: MACustomBuildingOverlayOption@$refId::setOptionWithCoordinates([\'count\':$count])');
    }
  
    // invoke native method
    final __result__ = await kAmapMapFluttifyChannel.invokeMethod('MACustomBuildingOverlayOption::setOptionWithCoordinates_count', {"coords": coords, "count": count, "__this__": this});
  
  
    // handle native call
  
  
    return __result__;
  }
  
  //endregion

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

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

  //region getters
  Future<List<double?>> get_height_batch() async {
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod("MACustomBuildingOverlayOption::get_height_batch", [for (final __item__ in this) {'__this__': __item__}]);
    return (resultBatch as List).map((__result__) => __result__).cast<double?>().toList();
  }
  
  Future<List<double?>> get_heightScale_batch() async {
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod("MACustomBuildingOverlayOption::get_heightScale_batch", [for (final __item__ in this) {'__this__': __item__}]);
    return (resultBatch as List).map((__result__) => __result__).cast<double?>().toList();
  }
  
  Future<List<UIColor?>> get_topColor_batch() async {
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod("MACustomBuildingOverlayOption::get_topColor_batch", [for (final __item__ in this) {'__this__': __item__}]);
    return (resultBatch as List).map((__result__) => AmapMapFluttifyIOSAs<UIColor>(__result__)).cast<UIColor?>().toList();
  }
  
  Future<List<UIColor?>> get_sideColor_batch() async {
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod("MACustomBuildingOverlayOption::get_sideColor_batch", [for (final __item__ in this) {'__this__': __item__}]);
    return (resultBatch as List).map((__result__) => AmapMapFluttifyIOSAs<UIColor>(__result__)).cast<UIColor?>().toList();
  }
  
  Future<List<bool?>> get_visibile_batch() async {
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod("MACustomBuildingOverlayOption::get_visibile_batch", [for (final __item__ in this) {'__this__': __item__}]);
    return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
  }
  
  //endregion

  //region setters
  Future<void> set_height_batch(List<double?> height) async {
    await kAmapMapFluttifyChannel.invokeMethod('MACustomBuildingOverlayOption::set_height_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "height": height[__i__]}]);
  
  
  }
  
  Future<void> set_heightScale_batch(List<double?> heightScale) async {
    await kAmapMapFluttifyChannel.invokeMethod('MACustomBuildingOverlayOption::set_heightScale_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "heightScale": heightScale[__i__]}]);
  
  
  }
  
  Future<void> set_topColor_batch(List<UIColor?> topColor) async {
    await kAmapMapFluttifyChannel.invokeMethod('MACustomBuildingOverlayOption::set_topColor_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "topColor": topColor[__i__]}]);
  
  
  }
  
  Future<void> set_sideColor_batch(List<UIColor?> sideColor) async {
    await kAmapMapFluttifyChannel.invokeMethod('MACustomBuildingOverlayOption::set_sideColor_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "sideColor": sideColor[__i__]}]);
  
  
  }
  
  Future<void> set_visibile_batch(List<bool?> visibile) async {
    await kAmapMapFluttifyChannel.invokeMethod('MACustomBuildingOverlayOption::set_visibile_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {'__this__': this[__i__], "visibile": visibile[__i__]}]);
  
  
  }
  
  //endregion

  //region methods
  
  static Future<List<MACustomBuildingOverlayOption?>> optionWithCoordinates_count_batch(List<List<CLLocationCoordinate2D>?> coords, List<int?> count) async {
    assert(coords.length == count.length);
  
    // invoke native method
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod('MACustomBuildingOverlayOption::optionWithCoordinates_count_batch', [for (int __i__ = 0; __i__ < coords.length; __i__++) {"coords": coords[__i__], "count": count[__i__]}]);
  
  
    return (resultBatch as List).map((__result__) => AmapMapFluttifyIOSAs<MACustomBuildingOverlayOption>(__result__)).cast<MACustomBuildingOverlayOption?>().toList();
  }
  
  
  Future<List<bool?>> setOptionWithCoordinates_count_batch(List<List<CLLocationCoordinate2D>?> coords, List<int?> count) async {
    assert(coords.length == count.length);
  
    // invoke native method
    final resultBatch = await kAmapMapFluttifyChannel.invokeMethod('MACustomBuildingOverlayOption::setOptionWithCoordinates_count_batch', [for (int __i__ = 0; __i__ < this.length; __i__++) {"coords": coords[__i__], "count": count[__i__], "__this__": this[__i__]}]);
  
  
    return (resultBatch as List).map((__result__) => __result__).cast<bool?>().toList();
  }
  
  //endregion
}