#import "BuildTypeModule.h"

@implementation BuildTypeModule

RCT_EXPORT_MODULE();

+ (BOOL)requiresMainQueueSetup
{
  return NO;
}

- (NSDictionary *)constantsToExport
{
#ifdef DEBUG
  NSString *buildType = @"debug";
#else
  NSString *buildType = @"release";
#endif
  
  return @{ @"buildType": buildType };
}

RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(getBuildTypeSync)
{
#ifdef DEBUG
  return @"debug";
#else
  return @"release";
#endif
}

RCT_EXPORT_METHOD(getBuildType:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject)
{
#ifdef DEBUG
  resolve(@"debug");
#else
  resolve(@"release");
#endif
}

@end 