from django.urls import path, include
from . import views
from rides.views import RideListView

app_name = 'parks'

urlpatterns = [
    path('', views.ParkListView.as_view(), name='park_list'),
    path('create/', views.ParkCreateView.as_view(), name='park_create'),
    path('rides/', RideListView.as_view(), name='all_rides'),  # Global rides list
    path('countries/search/', views.search_countries, name='search_countries'),
    path('countries/select/', views.select_country, name='select_country'),
    path('<slug:slug>/', views.ParkDetailView.as_view(), name='park_detail'),
    path('<slug:park_slug>/rides/', include('rides.urls', namespace='rides')),
]
