//
//  AMapRoute.h
//  react-native-anavi
//
//  Created by xiuyanger on 2020/9/15.
//

@import AMapNaviKit;
@import AMapSearchKit;
#import <UIKit/UIKit.h>
#import "AMapPathRoute.h"
#import <React/RCTView.h>
#import "AMapPathAnnotation.h"

NS_ASSUME_NONNULL_BEGIN

@interface AMapPathRouteView : UIView
@property(nonatomic, copy) RCTBubblingEventBlock onSearchStart;
@property(nonatomic, copy) RCTBubblingEventBlock onSearchComplete;

@property (assign, nonatomic) CLLocationCoordinate2D startPoint; //起始点经纬度
@property (assign, nonatomic) CLLocationCoordinate2D endPoint; //终点经纬度
@property (assign, nonatomic) NSInteger pathPadding;
@property (assign, nonatomic) NSInteger searchMode;

@property (assign, nonatomic) BOOL drawPath;
@property (assign, nonatomic) BOOL nodeVisible;
@property (assign, nonatomic) BOOL throughMarkerVisible;
@property (strong, nonatomic) UIImage *startMarkerIcon;
@property (strong, nonatomic) UIImage *endMarkerIcon;
@property (strong, nonatomic) UIImage *throughMarkerIcon;
@property (strong, nonatomic) UIImage *nodeMarkerIcon;

@property (strong, nonatomic) NSArray *wayPoints;
@property (strong, nonatomic) NSArray *avoidRegions;
@property (copy, nonatomic) NSString *avoidRoad;
@property (strong, nonatomic) NSArray *throughPoints;

@property (copy, nonatomic) NSString * startMarkerTitle;
@property (copy, nonatomic) NSString * endMarkerTitle;

@property (assign, nonatomic) CGFloat pathWidth;
@property (strong, nonatomic) UIColor *pathColor;
@property (strong, nonatomic) UIColor *normalPathColor;
@property (strong, nonatomic) UIColor *slowlyPathColor;
@property (strong, nonatomic) UIColor *blockedPathColor;
@property (strong, nonatomic) UIColor *severeBlockedPathColor;

@property (nonatomic, weak) MAMapView *mapView;
@property (nonatomic, strong) AMapPathRoute * pathRoute;
@property (nonatomic, strong) AMapSearchAPI *search;      // 地图内的搜索API类
@property (nonatomic, strong) AMapRoute *route;           //路径规划信息

- (void)calculateRoute;
- (void)presentRoute;
- (AMapPathAnnotationType) routeType;
- (void)addToMapView:(MAMapView *)mapView;
- (void)removeFromMapView;

@end

NS_ASSUME_NONNULL_END
