import { Marker, Alignment, LngLatLike, Map, MarkerOptions, Popup, PointLike } from 'maplibre-gl'; import { Nullable } from '../../types'; import { ComputedRef, MaybeRef, Ref } from 'vue'; /** * Marker creation status enum for better state management */ export declare enum MarkerStatus { NotCreated = "not-created", Creating = "creating", Created = "created", Error = "error" } interface MarkerEventHandlers { dragstart?: (e: Event) => void; drag?: (e: Event) => void; dragend?: (e: Event) => void; } interface CreateMarkerProps { map: MaybeRef>; lnglat?: MaybeRef; popup?: MaybeRef>; el?: Ref; options?: MarkerOptions; on?: MarkerEventHandlers; debug?: boolean; autoAdd?: boolean; } interface CreateMarkerActions { marker: ComputedRef>; markerStatus: ComputedRef; isMarkerCreated: ComputedRef; setLngLat: (lnglat: LngLatLike) => void; setPopup: (popup?: Popup | null) => void; setOffset: (offset: PointLike) => void; setDraggable: (draggable: boolean) => void; togglePopup: () => void; getElement: () => HTMLElement | null; setRotation: (rotation: number) => void; setRotationAlignment: (alignment: Alignment) => void; setPitchAlignment: (alignment: Alignment) => void; setOpacity: (opacity: string, opacityWhenCovered?: string) => void; removeMarker: () => void; addMarker: () => void; getLngLat: () => LngLatLike | null; getPopup: () => Popup | null; getOffset: () => PointLike; getDraggable: () => boolean; getRotation: () => number; } /** * Composable for managing MapLibre GL Markers * Provides reactive marker with error handling, performance optimizations, and enhanced API * * @param props - Configuration options for the marker * @returns Enhanced actions and state for the marker */ export declare function useCreateMarker({ map: mapRef, lnglat: lnglatVal, popup: popupRef, el, options, on, debug, autoAdd, }: CreateMarkerProps): CreateMarkerActions; export {};