//
//  CDVINDefaults.m
//  Indigitall
//
//  Created by indigitall on 20/7/22.
//

#import "CDVINDefaults.h"

@implementation CDVINDefaults
static NSString *INDIGITALL_HANDLE_WITH_NOTIFICATION_PUSH = @"IndigitallHandleWithNotificationPush";
static NSString *INDIGITALL_GET_PUSH_METHOD_URL = @"IndigitallGetPushMethodUrl";
static NSString *INDIGITALL_GET_NATIVE_PUSH_METHOD_URL = @"IndigitallGetNativePushMethodUrl";


+ (void) setObjectWithKey: (NSString *) key  value: (NSObject *) value {
    [[NSUserDefaults standardUserDefaults] setObject:value forKey:key];
}

+ (NSString *) getStringObjectWithKey: (NSString *) key {
    return [[NSUserDefaults standardUserDefaults] stringForKey:key];
}

+ (NSDictionary *) getDictionaryObjectWithKey: (NSString *) key {
    return [[NSUserDefaults standardUserDefaults] dictionaryForKey:key];
}

+ (void) setIndigitallHandleWithNotificationPush: (nullable NSDictionary *)value {
    [self setObjectWithKey:INDIGITALL_HANDLE_WITH_NOTIFICATION_PUSH value:value];
}

+ (NSDictionary *) getIndigitallHandleWithNotificationPush {
    return [self getDictionaryObjectWithKey:INDIGITALL_HANDLE_WITH_NOTIFICATION_PUSH];
}

+ (void) setGetPushMethodUrl: (nullable NSString *)value {
    [self setObjectWithKey:INDIGITALL_GET_PUSH_METHOD_URL value:value];
}

+ (NSString *) getGetPushMethodUrl {
    return [self getStringObjectWithKey:INDIGITALL_GET_PUSH_METHOD_URL];
}

+ (void) setGetNativePushMethodUrl: (nullable NSString *)value {
    [self setObjectWithKey:INDIGITALL_GET_NATIVE_PUSH_METHOD_URL value:value];
}

+ (NSString *) getGetNativePushMethodUrl {
    return [self getStringObjectWithKey:INDIGITALL_GET_NATIVE_PUSH_METHOD_URL];
}

@end
