| 1 | /** |
| 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | * |
| 4 | * This source code is licensed under the MIT license found in the |
| 5 | * LICENSE file in the root directory of this source tree. |
| 6 | * |
| 7 | * @noformat |
| 8 | * @nolint |
| 9 | * @flow |
| 10 | */ |
| 11 | |
| 12 | 'use strict'; |
| 13 | |
| 14 | import {BatchedBridge} from 'react-native/react-private-interface'; |
| 15 | |
| 16 | import type {ReactFabricType} from './ReactNativeTypes'; |
| 17 | |
| 18 | let ReactFabric: ReactFabricType; |
| 19 | |
| 20 | if (__DEV__) { |
| 21 | ReactFabric = require('../implementations/ReactFabric-dev'); |
| 22 | } else { |
| 23 | ReactFabric = require('../implementations/ReactFabric-prod'); |
| 24 | } |
| 25 | |
| 26 | global.RN$stopSurface = ReactFabric.stopSurface; |
| 27 | |
| 28 | if (global.RN$Bridgeless !== true) { |
| 29 | BatchedBridge.registerCallableModule('ReactFabric', ReactFabric); |
| 30 | } |
| 31 | |
| 32 | export default ReactFabric; |