import { NativeModules, Platform } from 'react-native'; const LINKING_ERROR = `The package 'react-native-yuno-zulu' doesn't seem to be linked. Make sure: \n\n` + Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo managed workflow\n'; const Yunosdklite = NativeModules.Yunosdklite ? NativeModules.Yunosdklite : new Proxy( {}, { get() { throw new Error(LINKING_ERROR); }, } ); export function initSdkYuno(apiKey: string): Promise { return Yunosdklite.initSdkYuno(apiKey); } export function initEnrollment(): Promise { return Yunosdklite.initEnrollment(); } export function startEnrollment( customer_session: string, country_iso: string ): Promise { return Yunosdklite.startEnrollment(customer_session, country_iso); } export function startCheckout( checkout_session: string, country_iso: string ): Promise { return Yunosdklite.startCheckout(checkout_session, country_iso); } export function startPaymentLite(type: string): Promise { return Yunosdklite.startPaymentLite(type); } export function continuePayment(): Promise { return Yunosdklite.continuePayment(); }