import { Nullable } from '../../types'; import { GeoJSONSource, GeoJSONSourceSpecification, Map } from 'maplibre-gl'; import { ComputedRef, MaybeRef, ShallowRef } from 'vue'; /** * Source creation status enum for better state management */ export declare enum SourceStatus { NotCreated = "not-created", Creating = "creating", Created = "created", Error = "error" } export interface CreateGeoJsonSourceActions { sourceId: string; getSource: ShallowRef>; setData: (data: GeoJSONSourceSpecification['data']) => void; removeSource: () => void; refreshSource: () => void; sourceStatus: ComputedRef; isSourceReady: ComputedRef; } export interface CreateGeoJsonSourceProps { map: MaybeRef>; id?: string; data: GeoJSONSourceSpecification['data']; options?: Partial; debug?: boolean; register?: (actions: CreateGeoJsonSourceActions, map: Map) => void; } /** * Composable for creating and managing MapLibre GL GeoJSON Sources * Provides reactive GeoJSON source with error handling, performance optimizations, and enhanced API * * @param props - Configuration options for the GeoJSON source * @returns Enhanced actions and state for the GeoJSON source */ export declare function useCreateGeoJsonSource({ map: mapRef, id, data, options, debug, register, }: CreateGeoJsonSourceProps): CreateGeoJsonSourceActions;