/*
 Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */

#import <Foundation/Foundation.h>
#import "React/RCTBridgeModule.h"

/// Provides method declarations of Analytics Kit.
@interface RCT_EXTERN_REMAP_MODULE(HMSAnalyticsModule, HMSAnalytics, NSObject)

RCT_EXTERN_METHOD(isRestrictionEnabled: (RCTPromiseResolveBlock)resolve
				  rejecter: (RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(setReportPolicies: (NSArray*)reportPolicyType resolve:(RCTPromiseResolveBlock)resolve
				  rejecter: (RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(setUserProfile: (NSString*)name value:(NSString*)value resolve:(RCTPromiseResolveBlock)resolve
				  rejecter: (RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(deleteUserProfile: (NSString*)name resolve:(RCTPromiseResolveBlock)resolve
				  rejecter: (RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(addDefaultEventParams: (NSDictionary*)params resolve:(RCTPromiseResolveBlock)resolve
                  rejecter: (RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(onEvent: (NSString*)eventId params:(NSDictionary*)params resolve:(RCTPromiseResolveBlock)resolve
                  rejecter: (RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(getUserProfiles: (BOOL*)predefined resolve:(RCTPromiseResolveBlock)resolve
				  rejecter: (RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(setAnalyticsEnabled: (BOOL*)enabled resolve:(RCTPromiseResolveBlock)resolve
				  rejecter: (RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(setCollectAdsIdEnabled: (BOOL*)enabled resolve:(RCTPromiseResolveBlock)resolve
				  rejecter: (RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(setRestrictionEnabled: (BOOL*)enabled resolve:(RCTPromiseResolveBlock)resolve
				  rejecter: (RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(getAAID: (RCTPromiseResolveBlock)resolve
				  rejecter: (RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(setUserId: (NSString*)predefined resolve:(RCTPromiseResolveBlock)resolve
				  rejecter: (RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(setSessionDuration: (NSInteger*)milliseconds resolve:(RCTPromiseResolveBlock)resolve
				  rejecter: (RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(clearCachedData: (RCTPromiseResolveBlock)resolve
				  rejecter: (RCTPromiseRejectBlock)reject)

@end
