"""
Simulator URL Configuration

This module provides URL patterns for:
- Email simulator endpoint
- SMS simulator endpoint
- HIS events handler
- Simulator health check
- Simulator logs viewer (UI)
- Simulator log details (UI)
"""

from django.urls import path
from . import views
from . import ui_views

app_name = "simulator"

urlpatterns = [
    # API Endpoints
    path("email/", views.email_simulator, name="email_simulator"),
    path("sms/", views.sms_simulator, name="sms_simulator"),
    path("his-patient-data/", views.his_patient_data_handler, name="his_patient_data_handler"),
    path("his-events/", views.his_events_handler, name="his_events_handler"),
    path("generate-visit/", views.generate_visit_data, name="generate_visit_data"),
    # Legacy URL aliases (for backward compatibility)
    path("send-email/", views.email_simulator, name="send_email_legacy"),
    path("send-sms/", views.sms_simulator, name="send_sms_legacy"),
    # Health & Status
    path("health/", views.health_check, name="health_check"),
    path("reset/", views.reset_simulator, name="reset_simulator"),
    # UI Views
    path("logs/", ui_views.simulator_logs_list, name="logs_list"),
    path("logs/<int:pk>/", ui_views.simulator_log_detail, name="log_detail"),
    path("logs/clear/", ui_views.simulator_clear_logs, name="clear_logs"),
]
