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

@interface RCT_EXTERN_MODULE(ReactNativeTink, UIViewController)



RCT_EXTERN_METHOD(connectAccount:
                  (NSString *)clientId
                  redirectUri:(NSString *)redirectUri
                  authorizationCode:(NSString*)authorizationCode
                  market:(NSString*)market
                  locale:(NSString*)locale
                  resolver:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject
                  )

RCT_EXTERN_METHOD(updateConsent: (NSString *)clientId
                  redirectUri:(NSString *)redirectUri
                  authorizationCode:(NSString*)authorizationCode
                  credentialID:(NSString*)credentialID
                  resolver:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject
                  )

RCT_EXTERN_METHOD(displayInsights: (NSString *)clientId
                  accessToken:(NSString *)accessToken
                  userId:(NSString*)userId
                  idHint:(NSString*)idHint
                  resolver:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject)


+ (BOOL)requiresMainQueueSetup
{
  return NO;
}

@end
