import type {ViewProps} from 'ViewPropTypes'; import type {HostComponent} from 'react-native'; import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import { FC } from "react"; import { SvgProps } from "react-native-svg"; import { Waterbody } from "@omniafishing/core"; type Pins = { Pin: FC; waterbody: Waterbody }[]; export interface ViewDidMoveProps { zoom: number, bounds: { south: number, north: number, east: number, west: number } } enum LAYER_TYPES { BASE = "BASE", CORE = "CORE", OVERLAY = "OVERLAY", WEATHER = "WEATHER", } enum BASE_LAYER { STANDARD = "STANDARD", SATELLITE = "SATELLITE", } enum OVERLAY_LAYER { PINS = "PINS", } enum CORE_LAYER { CONTOUR_DEPTH = "CONTOUR_DEPTH", CONTOUR_HARDNESS = "CONTOUR_HARDNESS", WATER_TEMP = "WATER_TEMP", CLARITY = "CLARITY", } enum WEATHER_LAYER { WIND = "WIND", RADAR = "RADAR", AIR_TEMP = "AIR_TEMP", LIGHTNING = "LIGHTNING", STORMS = "STORMS", } interface MapLayerState { [LAYER_TYPES.BASE]: BASE_LAYER; [LAYER_TYPES.CORE]: CORE_LAYER | undefined; [LAYER_TYPES.OVERLAY]: OVERLAY_LAYER[]; [LAYER_TYPES.WEATHER]: WEATHER_LAYER[]; } export interface NativeProps extends ViewProps { // aerisId: string; // aerisSecretKey: string; // mapboxAccessToken: string; // mapLayerState: MapLayerState; // pins: Pins; // selectedPin: Waterbody | undefined; // styleUrl: string; // userLocation: number[] | undefined; // onMapsglViewDidLoad: (args: {nativeEvent: {mapView: ViewDidMoveProps}}) => void; // onMapsglViewDidMove: (args: {nativeEvent: {mapView: ViewDidMoveProps}}) => void; // onSelectWaterbody: (args: {nativeEvent: {waterbody: Waterbody}}) => void; } export default codegenNativeComponent( 'RTNMapsGL', ) as HostComponent;