
# -*- coding: utf-8 -*-
"""
Core Application URL Configuration

This module defines the URL routing for the core application of the Adtlas DAI Management System. 
It includes the main URL patterns for the application, such as landing page, dashboard page, privacy 
policy page, terms and conditions page, and other api functions like health check, etc.

URL Structure:
    - /: The landing page.
    - /dashboard: The dashboard page.
    - /privacy-policy: The privacy policy page.
    - /terms-conditions: The terms and conditions page.
    - /api/health-check: The health check page.
    - /api/docs: The documentation page.  

Error Handling:
    The module handles common errors, such as 404 Not Found, 500 Internal Server Error, and 403 Forbidden.
    It provides custom error pages for these errors.

Views:
    - LandingView: The view for the landing page.
    - DashboardView: The view for the dashboard page.
    - PrivacyPolicyView: The view for the privacy policy page.
    - TermsConditionsView: The view for the terms and conditions page.
    - HealthCheckView: The view for the health check page.
    - DocumentationView: The view for the documentation page.

"""


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 public core app
public_urlpatterns = [
    # Landing page
    path("", views.LandingView.as_view(), name="landing"),  
    # Privacy policy page
    path("privacy", views.PrivacyPolicyView.as_view(), name="privacy"),
    # Terms of service page
    path("terms", views.TermsConditionsView.as_view(), name="terms"), 
    # Contact Page
    path("contact", views.ContactView.as_view(), name="contact"),
    # Newsletter Page
    path("newsletter", views.NewsletterView.as_view(), name="subscribe"),
    # Utility redirects
    path("index", RedirectView.as_view(pattern_name="core:landing", permanent=True), name="index_redirect"),
    # Health check page
    path("health", views.HealthCheckView.as_view(), name="health"),  
]

# URL patterns for private core app
private_urlpatterns = [  

]

# URL patterns for core app
urlpatterns = public_urlpatterns + private_urlpatterns

# Additional URL patterns for development/testing
if hasattr(views, "DEBUG") and views.DEBUG:
    # Add debug-only URLs if needed
    pass