# -*- coding: utf-8 -*-
"""
Core app URL configuration.

This module defines URL patterns for the core application,
including landing pages, dashboard, error pages, and API endpoints.

URL Patterns:
    - Home page and landing
    - About page
    - Contact page
    - Privacy policy page
    - Terms of service page
    - Dashboard page
    - Health check endpoint

"""

from django.urls import path
from django.views.generic import RedirectView

from apps.core import views

# App namespace for URL reversing
app_name = "core"

# URL patterns for core app
urlpatterns = [
    # Landing page
    path("", views.HomeView.as_view(), name="home"),
    # About page
    path("about", views.AboutView.as_view(), name="about"),
    # Contact page
    path("contact", views.ContactView.as_view(), name="contact"),
    # Privacy policy page
    path("privacy", views.PrivacyView.as_view(), name="privacy"),
    # Terms of service page
    path("terms", views.TOSView.as_view(), name="tos"),

    # Dashboard page
    path("dashboard", views.DashboardView.as_view(), name="dashboard"),
    
    path("health", views.HealthCheckView.as_view(), name="health_check"),
    
    # Utility redirects
    path( "index", RedirectView.as_view(pattern_name="core:home", permanent=True), name="index_redirect"),
]

# Additional URL patterns for development/testing
if hasattr(views, "DEBUG") and views.DEBUG:
    # Add debug-only URLs if needed
    pass