1"use strict"; 2var __importDefault = (this && this.__importDefault) || function (mod) { 3 return (mod && mod.__esModule) ? mod : { "default": mod }; 4}; 5Object.defineProperty(exports, "__esModule", { value: true }); 6exports.withErrorOverlay = void 0; 7const react_1 = __importDefault(require("react")); 8const react_native_1 = require("react-native"); 9const ErrorToastContainer_1 = __importDefault(require("./toast/ErrorToastContainer")); 10if (!global.setImmediate) { 11 global.setImmediate = function (fn) { 12 return setTimeout(fn, 0); 13 }; 14} 15if (process.env.NODE_ENV === 'development' && react_native_1.Platform.OS === 'web') { 16 // Stack traces are big with React Navigation 17 require('./LogBox').default.install(); 18} 19function withErrorOverlay(Comp) { 20 if (process.env.NODE_ENV === 'production') { 21 return Comp; 22 } 23 return function ErrorOverlay(props) { 24 return (react_1.default.createElement(ErrorToastContainer_1.default, null, 25 react_1.default.createElement(Comp, { ...props }))); 26 }; 27} 28exports.withErrorOverlay = withErrorOverlay; 29//# sourceMappingURL=index.js.map