import { NativeModules } from 'react-native'; import type { EdgeInsets, Rect } from 'src/types/MiscTypes'; export type RouteConstantsObject = { isCurrentlyInFocus: boolean; navBarHeight: number; statusBarHeight: number; navBarWithStatusBarHeight: number; safeAreaInsets: EdgeInsets; bounds: Rect; }; interface RNINavigatorRouteViewModule { setHidesBackButton(node: number, isHidden: boolean, animated: boolean): Promise; getRouteConstants(node: number): Promise; }; const COMPONENT_NAME = 'RNINavigatorRouteViewModule'; // Import native component export const RNINavigatorRouteViewModule: RNINavigatorRouteViewModule = NativeModules[COMPONENT_NAME];