//
//  AMapRidePathManager.m
//  react-native-anavi
//
//  Created by xiuyanger on 2020/9/15.
//
#import <React/RCTUIManager.h>
#import "AMapRidePathView.h"

@interface AMapRidePathManager : RCTViewManager
@end

@implementation AMapRidePathManager

RCT_EXPORT_MODULE(RidePath)

- (UIView *)view {
    return [AMapRidePathView new];
}
RCT_EXPORT_VIEW_PROPERTY(startPoint, CLLocationCoordinate2D)
RCT_EXPORT_VIEW_PROPERTY(endPoint, CLLocationCoordinate2D)

RCT_EXPORT_VIEW_PROPERTY(drawPath, BOOL)
RCT_EXPORT_VIEW_PROPERTY(nodeVisible, BOOL)
RCT_EXPORT_VIEW_PROPERTY(startMarkerIcon, UIImage)
RCT_EXPORT_VIEW_PROPERTY(endMarkerIcon, UIImage)
RCT_EXPORT_VIEW_PROPERTY(throughMarkerIcon, UIImage)
RCT_EXPORT_VIEW_PROPERTY(nodeMarkerIcon, UIImage)
RCT_EXPORT_VIEW_PROPERTY(startMarkerTitle, NSString)
RCT_EXPORT_VIEW_PROPERTY(endMarkerTitle, NSString)
RCT_EXPORT_VIEW_PROPERTY(showsBuildings, BOOL)
RCT_EXPORT_VIEW_PROPERTY(pathWidth, CGFloat)
RCT_EXPORT_VIEW_PROPERTY(pathColor, UIColor)
RCT_EXPORT_VIEW_PROPERTY(normalPathColor, UIColor)
RCT_EXPORT_VIEW_PROPERTY(slowlyPathColor, UIColor)
RCT_EXPORT_VIEW_PROPERTY(blockedPathColor, UIColor)
RCT_EXPORT_VIEW_PROPERTY(severeBlockedPathColor, UIColor)
RCT_EXPORT_VIEW_PROPERTY(throughMarkerVisible, BOOL)
RCT_EXPORT_VIEW_PROPERTY(wayPoints, NSArray)
RCT_EXPORT_VIEW_PROPERTY(avoidRegions, NSArray)
RCT_EXPORT_VIEW_PROPERTY(avoidRoad, NSString)
RCT_EXPORT_VIEW_PROPERTY(throughPoints, NSArray)

RCT_EXPORT_VIEW_PROPERTY(onSearchStart, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onSearchComplete, RCTBubblingEventBlock)

@end
