import { codegenNativeCommands, codegenNativeComponent, type HostComponent, type ViewProps, } from 'react-native'; import type { DirectEventHandler, Double, Int32, WithDefault, } from 'react-native/Libraries/Types/CodegenTypes'; /* Type should be redeclared because of codegen ts parser doesn't allow imported type * [comments](https://github.com/reactwg/react-native-new-architecture/discussions/91#discussioncomment-4282452) */ interface BaseOverlay { zIndexValue: Int32; globalZIndexValue: Int32; isHidden?: WithDefault; minZoom: Double; maxZoom: Double; isMinZoomInclusive?: WithDefault; isMaxZoomInclusive?: WithDefault; } export type NativeCaptionProp = { key: string; text: string; requestedWidth?: Double; align?: Int32; offset?: Double; color?: Int32; haloColor?: Int32; textSize?: Double; minZoom?: Double; maxZoom?: Double; }; export type NativeSubCaptionProp = { key: string; text: string; color?: Int32; haloColor?: Int32; textSize?: Double; requestedWidth?: Double; minZoom?: Double; maxZoom?: Double; }; export type NativeImageProp = Readonly<{ symbol?: string; rnAssetUri?: string; httpUri?: string; assetName?: string; reuseIdentifier?: string; }>; //////////////////// interface Props extends BaseOverlay, ViewProps { coord: Readonly<{ latitude: Double; longitude: Double; }>; onTapOverlay?: DirectEventHandler>; width?: Double; height?: Double; anchor?: Readonly<{ x: Double; y: Double }>; angle?: Double; isFlatEnabled?: WithDefault; isIconPerspectiveEnabled?: WithDefault; alpha?: Double; isHideCollidedSymbols?: WithDefault; isHideCollidedMarkers?: WithDefault; isHideCollidedCaptions?: WithDefault; isForceShowIcon?: WithDefault; tintColor?: Int32; image?: Readonly; caption?: Readonly; subCaption?: Readonly; } type ComponentType = HostComponent; interface NativeCommands { showInfoWindow: ( ref: React.ElementRef, infoWindowId: string, alignType: Int32 ) => void; } export default codegenNativeComponent('RNCNaverMapMarker'); export const Commands: NativeCommands = codegenNativeCommands({ supportedCommands: ['showInfoWindow'], });