import type { HostComponent, ProcessedColorValue, ViewProps, } from 'react-native'; import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type { Expression } from '../utils/MapboxStyles'; import { UnsafeMixed } from './codegenUtils'; type Value = T | Expression; // see https://github.com/rnmapbox/maps/wiki/FabricOptionalProp type OptionalProp = UnsafeMixed; type Pulsing = | { isEnabled?: boolean; radius?: 'accuracy' | number; color?: ProcessedColorValue | null | undefined; } | { kind: 'default' }; export interface NativeProps extends ViewProps { androidRenderMode?: OptionalProp; puckBearing?: OptionalProp<'heading' | 'course'>; puckBearingEnabled?: OptionalProp; bearingImage?: OptionalProp; shadowImage?: OptionalProp; topImage?: OptionalProp; scale?: UnsafeMixed>; visible?: boolean; pulsing?: UnsafeMixed; } // @ts-ignore-error - Codegen requires single cast but TypeScript prefers double cast export default codegenNativeComponent( 'RNMBXNativeUserLocation', ) as HostComponent;