//
//  ReactNativeBridge.m
//  ReactNativeLoginWithApple
//
//  Created by PRAMOD_PUNCHH on 06/06/19.
//  Copyright © 2019 PRAMOD. All rights reserved.
//

#import "RNAppleLoginBridge.h"
#import "LoginWithApple.h"

@implementation RNAppleLoginBridge

RCT_EXPORT_MODULE()

RCT_EXPORT_METHOD(startAppleLoginProcess:(RCTPromiseResolveBlock )resolve reject:(RCTPromiseRejectBlock )reject)
{
    [[LoginWithApple sharedInstance] initiateLoginProcess:^(NSDictionary * _Nonnull result) {
         resolve(result);
    } errorHandler:^(NSError * _Nonnull error) {
        reject(@"100", @"Error", error);
    }];
}

@end
