"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
exports.isLoaded = isLoaded;
var _reactNative = require("react-native");
//@ts-ignore we want to ignore everything
// else in global except what we need to access.
// Maybe there is a better way to do this.

// Installing JSI Bindings
//@ts-ignore
const KeysModule = global;
function isLoaded() {
  return typeof KeysModule.secureFor === 'function';
}
if (!isLoaded()) {
  var _NativeModules$Keys;
  const result = (_NativeModules$Keys = _reactNative.NativeModules.Keys) === null || _NativeModules$Keys === void 0 ? void 0 : _NativeModules$Keys.install();
  if (!result && !isLoaded()) throw new Error('JSI bindings were not installed for: Keys Module');
  if (!isLoaded()) {
    throw new Error('JSI bindings were not installed for: Keys Module');
  }
}
Object.assign(KeysModule, {
  ...(_reactNative.Platform.OS === 'android' ? JSON.parse(KeysModule.publicKeys()) : KeysModule.publicKeys())
});
var _default = KeysModule;
exports.default = _default;
//# sourceMappingURL=index.js.map