//
// UserNotificationsManager.h
// MapApp
//
// Created by Ziv on 16/12/17.
// Copyright © 2016年 Ziv. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>

typedef void (^DidReceiveNotificationResponseHandler)(id obj);

@interface NMNotificationContent : NSObject
@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) NSString *body;
@property (nonatomic, assign) NSInteger badgeNumber;
@property (nonatomic, strong) NSString *launchImageName;
@property (nonatomic, strong) NSString *soundName;
@property (nonatomic, strong) NSDictionary *userInfo;
@end

@interface NMNotificationTrigger : NSObject
@property (nonatomic, assign) BOOL repeats;
@property (nonatomic, assign) NSTimeInterval timeInterval;
@property (nonatomic, strong) NSDateComponents *dateComponents;
@property (nonatomic, strong) CLRegion *region;
@end

@interface NMNotificationRequest : NSObject
@property (nonatomic, strong) NSString *identifier;
@property (nonatomic, strong) NMNotificationContent *content;
@property (nonatomic, strong) NMNotificationTrigger *trigger;
@end

@interface UserNotificationsManager : NSObject
@property(nonatomic, copy) DidReceiveNotificationResponseHandler handler;
+ (instancetype)sharedManager;
+ (BOOL)authorizeUserNotifications;
+ (void)addNotificationRequest:(NMNotificationRequest *)request;
+ (void)removeAllPendingNotificationRequests;

@end
