//
// Copyright © 2023 Nevis Security AG. All rights reserved.
//


#if !defined(RCT_NEW_ARCH_ENABLED)
#error "Nevis Mobile Authentication SDK React Native plugin requires the React Native New Architecture!"
#endif

#import "NevisMobileAuthenticationSdkReact.h"
#import <RNNevisMobileAuthenticationSdkReactSpec/RNNevisMobileAuthenticationSdkReactSpec.h>

// ObjC category — injects RCTBridgeModule + NativeSpec conformance into ObjC runtime
@interface NevisMobileAuthenticationSdkReact (TurboModule) <NativeNevisMobileAuthenticationSdkReactSpec>
@end

@implementation NevisMobileAuthenticationSdkReact (TurboModule)

// Registers via __attribute__((constructor)) — Swift-safe, works in bridgeless mode
RCT_EXPORT_MODULE_NO_LOAD(NevisMobileAuthenticationSdkReact, NevisMobileAuthenticationSdkReact)

- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
	(const facebook::react::ObjCTurboModule::InitParams &)params
{
	return std::make_shared<facebook::react::NativeNevisMobileAuthenticationSdkReactSpecJSI>(params);
}

@end
