//
//  TSGeofence.h
//  TSLocationManager
//
//  Created by Christopher Scott on 2016-12-21.
//  Copyright © 2016 Transistor Software. All rights reserved.
//
#import <Foundation/Foundation.h>

@interface TSGeofence : NSObject
{
    
}
@property (nonatomic) NSString* identifier;
@property (nonatomic) CLLocationDistance radius;

@property (nonatomic) CLLocationDegrees latitude;
@property (nonatomic) CLLocationDegrees longitude;
@property (nonatomic) BOOL notifyOnEntry;
@property (nonatomic) BOOL notifyOnExit;
@property (nonatomic) BOOL notifyOnDwell;
@property (nonatomic) double loiteringDelay;
@property (nonatomic) NSDictionary* extras;
@property (nonatomic) NSArray* vertices;
/**
 * Arbitrary extra data attached to the geofence
 */

-(instancetype) initWithIdentifier:(NSString*)identifier
                            radius:(CLLocationDistance)radius
                          latitude:(CLLocationDegrees)latitude
                         longitude:(CLLocationDegrees)lontitude
                     notifyOnEntry:(BOOL)notifyOnEntry
                      notifyOnExit:(BOOL)notifyOnExit
                     notifyOnDwell:(BOOL)notifyOnDwell
                    loiteringDelay:(double)loiteringDelay;

-(instancetype) initWithIdentifier:(NSString*)identifier
                            radius:(CLLocationDistance)radius
                          latitude:(CLLocationDegrees)latitude
                         longitude:(CLLocationDegrees)longitude
                     notifyOnEntry:(BOOL)notifyOnEntry
                      notifyOnExit:(BOOL)notifyOnExit
                     notifyOnDwell:(BOOL)notifyOnDwell
                    loiteringDelay:(double)loiteringDelay
                            extras:(NSDictionary*)extras
                          vertices:(NSArray*)vertices;

- (NSDictionary*) toDictionary;
- (BOOL) isPolygon;

    
@end

