#import "WeighScale.h"
#import "MainViewController.h"
#import "AppDelegate.h"

@implementation WeighScale

RCT_EXPORT_MODULE()

RCT_EXPORT_METHOD(sampleMethod:(NSString *)stringArgument numberParameter:(nonnull NSNumber *)numberArgument callback:(RCTResponseSenderBlock)callback)
{
    // TODO: Implement some actually useful functionality
    callback(@[[NSString stringWithFormat: @"numberArgument: %@ stringArgument: %@", numberArgument, stringArgument]]);
}

RCT_EXPORT_METHOD(showNativeView)
{
    // TODO: Implement some actually useful functionality
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    MainViewController *mainView = (MainViewController*)[storyboard instantiateViewControllerWithIdentifier:@"mainViewController"];
    
    [[UIApplication sharedApplication].keyWindow addSubview:mainView.view];

    //callback(@[[NSString stringWithFormat: @"numberArgument: %@ stringArgument: %@", numberArgument, stringArgument]]);
}

@end
