import type {HostComponent} from 'react-native'; import {codegenNativeCommands} from 'react-native'; import type {NativeProps} from './MapMarker'; import type {LatLng} from './sharedTypes'; export type MapMarkerNativeComponentType = HostComponent; interface NativeCommands { showCallout: ( viewRef: NonNullable< React.RefObject['current'] >, ) => void; hideCallout: ( viewRef: NonNullable< React.RefObject['current'] >, ) => void; setCoordinates: ( viewRef: NonNullable< React.RefObject['current'] >, coordinate: LatLng, ) => void; redrawCallout: ( viewRef: NonNullable< React.RefObject['current'] >, ) => void; animateMarkerToCoordinate: ( viewRef: NonNullable< React.RefObject['current'] >, coordinate: LatLng, duration: number, ) => void; redraw: ( viewRef: NonNullable< React.RefObject['current'] >, ) => void; } export const Commands: NativeCommands = codegenNativeCommands({ supportedCommands: [ 'showCallout', 'hideCallout', 'animateMarkerToCoordinate', 'setCoordinates', 'redraw', ], });