//
//  GizPickRegionViewController.h
//  GizwitsGeofence
//
//  Created by Gizwits on 2018/8/22.
//  Copyright © 2018年 Gizwits. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN


typedef void (^GizPickRegionCompletionHandler)(NSDictionary * _Nullable dict, BOOL canceled);


@interface GizPickRegionViewController : UIViewController

@property (nonatomic, strong, nullable) UIColor *themeColor;
@property (nonatomic, strong, nullable) NSString *rightButtonTitle;

/**
 选取区域。

 @param regionDict 选取新区域时，传 nil；编辑区域则传入对应的区域信息。格式：{"radius": 200, "latitude": 32.123456, "longitude": 122.123456}
 @param completionHandler 操作结果回调。
 @return 选取区域
 */
+ (instancetype)pickRegionWithRegionDict:(nullable NSDictionary *)regionDict completionHandler:(GizPickRegionCompletionHandler)completionHandler;

/**
 选取位置。

 @param addressDict 选取新地址，传 nil；编辑地址则传入对应的地址。格式：{"latitude": 32.123456, "longitude": 122.123456, "": ""}
 @param completionHandler 操作结果回调。
 @return 选取地址
 */
+ (instancetype)pickAddressWithRegionDict:(nullable NSDictionary *)addressDict completionHandler:(GizPickRegionCompletionHandler)completionHandler;

@end

NS_ASSUME_NONNULL_END
