from django.urls import path
from . import views


urlpatterns = [
    path('', views.dashboard, name='dashboard'),
    path('settings/', views.settings, name='settings'),
    path('ops-logs/', views.operation_logs, name='operation_logs'),
    path('plans/', views.plans_list, name='plans'),
    path('plans/new/', views.plan_create, name='plan_create'),
    path('plans/<int:plan_id>/edit/', views.plan_edit, name='plan_edit'),
    path('plans/<int:plan_id>/toggle-active/', views.plan_toggle_active, name='plan_toggle_active'),
    path('plans/<int:plan_id>/toggle-public/', views.plan_toggle_public, name='plan_toggle_public'),
    path('plans/<int:plan_id>/toggle-allow-new/', views.plan_toggle_allow_new, name='plan_toggle_allow_new'),
    path('plans/<int:plan_id>/toggle-allow-renew/', views.plan_toggle_allow_renew, name='plan_toggle_allow_renew'),
    # Users & Domains management
    path('users/', views.users_list, name='users'),
    path('domains/', views.domains_list, name='domains'),
    path('domains/<int:domain_id>/toggle-suspend/', views.domain_toggle_suspend, name='domain_toggle_suspend'),
    path('domains/<int:domain_id>/delete/', views.domain_delete, name='domain_delete'),
    path('domains/<int:domain_id>/switch-plan/', views.domain_switch_plan, name='domain_switch_plan'),
    path('domains/<int:domain_id>/grant-traffic/', views.domain_grant_traffic, name='domain_grant_traffic'),
    # Billing management (admin)
    path('billing/', views.invoices_list, name='billing_list'),
    path('billing/<int:invoice_id>/', views.invoice_detail_admin, name='billing_detail'),
    # Quotas view & Monitoring
    path('quotas/', views.quotas_view, name='quotas'),
    path('monitoring/', views.monitoring_view, name='monitoring'),
]