// Types (single source of truth)
export type {
  // Marker
  MarkerData,
  // Viewport
  MapViewport,
  // Context
  MapContextValue,
  // Hook return types
  MapControlActions,
  MarkerActions,
  MapEventHandlers,
  MapMouseEvent,
  // Style
  MapStyleKey,
  // Layer specs (re-exported from react-map-gl)
  LayerProps,
  FillLayerSpecification,
  CircleLayerSpecification,
  LineLayerSpecification,
  SymbolLayerSpecification,
  FilterSpecification,
  ControlPosition,
  MarkerProps,
  // Layer options
  ClusterLayerOptions,
  PointLayerOptions,
  PolygonLayerOptions,
  LineLayerOptions,
  RouteLayerOptions,
  // Control props
  DrawControlProps,
  GeocoderControlProps,
  CustomOverlayProps,
  // Legend
  LegendItem,
  MapLegendProps,
  // Layer switcher
  LayerConfig,
  LayerSwitcherProps,
} from './types'

// Context
export { MapProvider, useMapContext, MapContext } from './context'
export type { MapProviderProps } from './context'

// Hooks
export {
  useMap,
  useMapControl,
  useMarkers,
  useMapEvents,
  useMapViewport,
  useMapLayers,
  useControl,
} from './hooks'

// Components
export {
  MapContainer,
  MapView,
  MapControls,
  MapMarker,
  MapPopup,
  MapCluster,
  MapSource,
  MapLayer,
  CustomOverlay,
  MapLegend,
  LayerSwitcher,
} from './components'
export type {
  MapContainerProps,
  MapControlsProps,
  MapMarkerProps,
  MapPopupProps,
  MapClusterProps,
  MapSourceProps,
  MapLayerProps,
} from './components'

// Layers
export {
  createClusterLayers,
  createPointLayer,
  createHeatmapLayer,
  createPolygonLayer,
  createPolygonOutlineLayer,
  createHighlightLayer,
  createLineLayer,
  createRouteLayers,
  createDashedLineLayer,
  createAnimatedLineLayer,
} from './layers'

// Styles
export { MAP_STYLES, getMapStyle } from './styles'

// Utils
export {
  calculateBounds,
  calculateCenter,
  calculateDistance,
  isPointInBounds,
  expandBounds,
  toGeoJSON,
  fromGeoJSON,
  createPoint,
  createPolygon,
  createLineString,
  createFeatureCollection,
} from './utils'

// Re-export useful types from react-map-gl
export type { ViewState, MapRef } from 'react-map-gl/maplibre'
export { Source, Layer, Marker, Popup } from 'react-map-gl/maplibre'
