"""
Core API URL configuration.
Centralized from apps.core.urls
"""

from django.urls import include, path
from rest_framework.routers import DefaultRouter

from . import views
from apps.core.api.milestone_views import MilestoneViewSet

# Create router for viewsets
router = DefaultRouter()
router.register(r"milestones", MilestoneViewSet, basename="milestone")

# Entity search endpoints - migrated from apps.core.urls
urlpatterns = [
    path(
        "entities/search/",
        views.EntityFuzzySearchView.as_view(),
        name="entity_fuzzy_search",
    ),
    path(
        "entities/not-found/",
        views.EntityNotFoundView.as_view(),
        name="entity_not_found",
    ),
    path(
        "entities/suggestions/",
        views.QuickEntitySuggestionView.as_view(),
        name="entity_suggestions",
    ),
    # Telemetry endpoint for frontend logging
    path(
        "telemetry/",
        views.TelemetryView.as_view(),
        name="telemetry",
    ),
    # Include router URLs (milestones, etc.)
    path("", include(router.urls)),
]

