//
//  CfLogPayments.m
//  ReactNativeCfPayments
//
//  Created by MOIZ HASSAN KHAN on 17/12/23.
//  Copyright © 2023 Facebook. All rights reserved.
//

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

@interface RCT_EXTERN_MODULE(CfLogPayments, NSObject)

//RCT_EXTERN_METHOD(multiply:(float)a withB:(float)b
//                 withResolver:(RCTPromiseResolveBlock)resolve
//                 withRejecter:(RCTPromiseRejectBlock)reject)

// Expose Swift method 1
RCT_EXTERN_METHOD(logDeferredPaymentEvent:(NSString *)orderId
                  paymentId:(NSString *)paymentId
                  paymentMethod:(NSString *)paymentMethod
                  paymentAction:(NSString *)paymentAction
                  accountBalance:(nonnull NSNumber *)accountBalance
                  paymentAmount:(nonnull NSNumber *)paymentAmount
                  currency:(NSString *)currency
                  isSuccessful:(BOOL)isSuccessful
                  updateImmediately:(BOOL)updateImmediately)


RCT_EXTERN_METHOD(logPaymentMethodEvent:(NSString *)paymentId
                  orderId:(NSString *)orderId
                  paymentMethod:(NSString *)paymentMethod
                  paymentAction:(NSString *)paymentAction
                  paymentAmount:(nonnull NSNumber *)paymentAmount
                  currency:(NSString *)currency
                  updateImmediately:(BOOL)updateImmediately)
    
    
+ (BOOL)requiresMainQueueSetup
{
  return YES;
}

@end

