"""
URL patterns for the unified map service API.
"""

from django.urls import path

from ..views.map_views import (
    MapBoundsView,
    MapCacheView,
    MapLocationDetailView,
    MapLocationsView,
    MapSearchView,
    MapStatsView,
)

app_name = "map_api"

urlpatterns = [
    # Main map data endpoint
    path("locations/", MapLocationsView.as_view(), name="locations"),
    # Location detail endpoint
    path(
        "locations/<str:location_type>/<int:location_id>/",
        MapLocationDetailView.as_view(),
        name="location_detail",
    ),
    # Search endpoint
    path("search/", MapSearchView.as_view(), name="search"),
    # Bounds-based query endpoint
    path("bounds/", MapBoundsView.as_view(), name="bounds"),
    # Service statistics endpoint
    path("stats/", MapStatsView.as_view(), name="stats"),
    # Cache management endpoints
    path("cache/", MapCacheView.as_view(), name="cache"),
    path("cache/invalidate/", MapCacheView.as_view(), name="cache_invalidate"),
]
