from django.urls import path
from . import views

urlpatterns = [
    path('',          views.home,      name='home'),
    path('dashboard/', views.dashboard, name='dashboard'),
    path('settings/', views.company_settings, name='company_settings'),
    path('settings/', views.company_settings, name='system_settings'),  # legacy alias

    path('offline/', views.offline, name='offline'),
    path('upgrade/', views.upgrade_required, name='upgrade_required'),

    # ── Hub Navigation ──
    path('sales-hub/', views.sales_hub, name='sales_hub'),
    path('inventory-hub/', views.inventory_hub, name='inventory_hub'),
    path('insights-hub/', views.insights_hub, name='insights_hub'),
    path('admin-hub/', views.admin_hub, name='admin_hub'),

    # ── Branch management ──
    path('branches/', views.branch_list, name='branch_list'),
    path('branches/add/', views.branch_create, name='branch_create'),
    path('branches/<int:pk>/', views.branch_detail, name='branch_detail'),
    path('branches/<int:pk>/edit/', views.branch_update, name='branch_update'),
    path('branches/<int:pk>/delete/', views.branch_delete, name='branch_delete'),

    # ── Promo codes ──
    path('promos/', views.promo_list, name='promo_list'),
    path('promos/create/', views.promo_create, name='promo_create'),
    path('promos/<int:pk>/toggle/', views.promo_toggle, name='promo_toggle'),
    path('promos/<int:pk>/delete/', views.promo_delete, name='promo_delete'),

    # ── AI Web Assistant ──
    path('ai/chat/', views.web_ai_chat, name='web_ai_chat'),
    path('ai/prompts/', views.web_ai_prompts, name='web_ai_prompts'),
]
