import { createNavigationContainerRef } from '@react-navigation/native';
export const navigationRef = createNavigationContainerRef();
let notification = null;
let isSdkReady = false;
export function navigate(name, params) {
  if (navigationRef.isReady() && isSdkReady) {
    navigationRef.navigate(name, params);
  } else {
    notification = {
      name,
      params
    };
  }
}
export function onNavigationReady() {
  if (notification && navigationRef.isReady() && isSdkReady) {
    navigationRef.navigate(notification.name, notification.params);
    notification = null;
  }
}
export function onSdkReady() {
  isSdkReady = true;
  if (notification && navigationRef.isReady()) {
    navigationRef.navigate(notification.name, notification.params);
    notification = null;
  }
}
//# sourceMappingURL=navigation.js.map