"""
CMS Dashboard URL configuration.
All routes live under /cms/
"""
from django.urls import path, include
from django.views.generic import RedirectView
from . import cms_views
from . import security_views

urlpatterns = [
    # Veventa, events ERP
    path('veventa/', include('apps.veventa.cms_urls')),

    # Profile (accessible to all CMS users)
    path('profile/', cms_views.my_profile, name='cms_my_profile'),

    # Auth
    path('login/', cms_views.cms_login, name='cms_login'),
    # The second factor is served at /login/ now. This route stays so an old
    # bookmark or a browser that remembers the redirect still lands somewhere
    # useful, and it keeps the name that reverse() calls elsewhere rely on.
    path('login/2fa/', RedirectView.as_view(pattern_name='cms_login', permanent=False),
         name='cms_2fa_verify'),
    path('logout/', cms_views.cms_logout, name='cms_logout'),

    # Security / 2FA
    path('security/', security_views.security_settings, name='cms_security'),

    # Dashboard
    path('', cms_views.dashboard, name='cms_dashboard'),
    path('dashboard/trend.json', cms_views.dashboard_trend_json, name='cms_dashboard_trend_json'),

    # CRM
    path('crm/', cms_views.crm, name='cms_crm'),
    path('crm/lead-trend.json', cms_views.crm_lead_trend_json, name='cms_crm_lead_trend_json'),

    # Analytics
    path('analytics/', cms_views.analytics, name='cms_analytics'),

    # Homepage sections
    path('homepage/', cms_views.homepage_editor, name='cms_homepage'),
    path('homepage/hero/', cms_views.edit_hero, name='cms_hero'),
    path('homepage/about/', cms_views.edit_about, name='cms_about'),
    path('homepage/founder/', cms_views.edit_founder, name='cms_founder'),
    path('homepage/process/', cms_views.edit_process, name='cms_process'),
    path('homepage/why/', cms_views.edit_why, name='cms_why'),
    path('homepage/cta1/', cms_views.edit_cta1, name='cms_cta1'),
    path('homepage/cta2/', cms_views.edit_cta2, name='cms_cta2'),
    path('homepage/testimonials-section/', cms_views.edit_testimonials_section, name='cms_testimonials_section'),

    # Services
    path('services/', cms_views.services_list, name='cms_services'),
    path('services/add/', cms_views.service_edit, name='cms_service_add'),
    path('services/<int:pk>/edit/', cms_views.service_edit, name='cms_service_edit'),
    path('services/<int:pk>/delete/', cms_views.service_delete, name='cms_service_delete'),
    path('services/<int:pk>/toggle-visibility/', cms_views.service_toggle_visibility, name='cms_service_toggle_visibility'),
    path('services/<int:pk>/toggle-home/', cms_views.service_toggle_home, name='cms_service_toggle_home'),
    path('services/category/add/', cms_views.service_category_edit, name='cms_service_category_add'),
    path('services/category/<int:pk>/edit/', cms_views.service_category_edit, name='cms_service_category_edit'),
    path('services/category/<int:pk>/delete/', cms_views.service_category_delete, name='cms_service_category_delete'),

    # Why Choose US boxes
    path('why-boxes/', cms_views.why_boxes_list, name='cms_why_boxes'),
    path('why-boxes/add/', cms_views.why_box_edit, name='cms_why_box_add'),
    path('why-boxes/<int:pk>/edit/', cms_views.why_box_edit, name='cms_why_box_edit'),
    path('why-boxes/<int:pk>/delete/', cms_views.why_box_delete, name='cms_why_box_delete'),
    path('why-boxes/<int:pk>/toggle-visibility/', cms_views.why_box_toggle_visibility, name='cms_why_box_toggle_visibility'),

    # Testimonials
    path('testimonials/', cms_views.testimonials_list, name='cms_testimonials'),
    path('testimonials/add/', cms_views.testimonial_edit, name='cms_testimonial_add'),
    path('testimonials/<int:pk>/edit/', cms_views.testimonial_edit, name='cms_testimonial_edit'),
    path('testimonials/<int:pk>/toggle-visibility/', cms_views.testimonial_toggle_visibility, name='cms_testimonial_toggle_visibility'),
    path('testimonials/<int:pk>/delete/', cms_views.testimonial_delete, name='cms_testimonial_delete'),

    # Partner logos
    path('partners/', cms_views.partners_list, name='cms_partners'),
    path('partners/add/', cms_views.partner_edit, name='cms_partner_add'),
    path('partners/<int:pk>/edit/', cms_views.partner_edit, name='cms_partner_edit'),
    path('partners/<int:pk>/toggle-visibility/', cms_views.partner_toggle_visibility, name='cms_partner_toggle_visibility'),
    path('partners/<int:pk>/delete/', cms_views.partner_delete, name='cms_partner_delete'),

    # Portfolio
    path('portfolio/', cms_views.portfolio_list, name='cms_portfolio'),
    path('portfolio/add/', cms_views.portfolio_edit, name='cms_portfolio_add'),
    path('portfolio/<int:pk>/edit/', cms_views.portfolio_edit, name='cms_portfolio_edit'),
    path('portfolio/<int:pk>/toggle-home/', cms_views.portfolio_toggle_home, name='cms_portfolio_toggle_home'),
    path('portfolio/<int:pk>/delete/', cms_views.portfolio_delete, name='cms_portfolio_delete'),
    path('portfolio/<int:pk>/toggle-visibility/', cms_views.portfolio_toggle_visibility, name='cms_portfolio_toggle_visibility'),
    path('portfolio/category/add/', cms_views.portfolio_category_edit, name='cms_portfolio_category_add'),
    path('portfolio/category/<int:pk>/edit/', cms_views.portfolio_category_edit, name='cms_portfolio_category_edit'),
    path('portfolio/category/<int:pk>/delete/', cms_views.portfolio_category_delete, name='cms_portfolio_category_delete'),

    # Homepage services header — the three lines above the service cards
    path('homepage/services-header/', cms_views.edit_services_header, name='cms_services_header'),

    # Homepage counters — the band of figures under the hero
    path('homepage/counters/', cms_views.counters_list, name='cms_counters'),
    path('homepage/counters/add/', cms_views.counter_edit, name='cms_counter_add'),
    path('homepage/counters/<int:pk>/edit/', cms_views.counter_edit, name='cms_counter_edit'),
    path('homepage/counters/<int:pk>/delete/', cms_views.counter_delete, name='cms_counter_delete'),
    path('homepage/counters/<int:pk>/toggle-visibility/', cms_views.counter_toggle_visibility, name='cms_counter_toggle_visibility'),

    # Homepage slides — the panels of the hero carousel
    path('homepage/slides/', cms_views.slides_list, name='cms_slides'),
    path('homepage/slides/add/', cms_views.slide_edit, name='cms_slide_add'),
    path('homepage/slides/<int:pk>/edit/', cms_views.slide_edit, name='cms_slide_edit'),
    path('homepage/slides/<int:pk>/delete/', cms_views.slide_delete, name='cms_slide_delete'),
    path('homepage/slides/<int:pk>/toggle-visibility/', cms_views.slide_toggle_visibility, name='cms_slide_toggle_visibility'),

    # Brands — sub-brands of a group, each served at /<slug>/ on the site
    path('brands/', cms_views.brands_list, name='cms_brands'),
    path('brands/add/', cms_views.brand_edit, name='cms_brand_add'),
    path('brands/<int:pk>/edit/', cms_views.brand_edit, name='cms_brand_edit'),
    path('brands/<int:pk>/delete/', cms_views.brand_delete, name='cms_brand_delete'),
    path('brands/<int:pk>/toggle-visibility/', cms_views.brand_toggle_visibility, name='cms_brand_toggle_visibility'),

    # Insights
    path('insights/', cms_views.insights_list, name='cms_insights'),
    path('insights/add/', cms_views.insight_edit, name='cms_insight_add'),
    path('insights/<int:pk>/edit/', cms_views.insight_edit, name='cms_insight_edit'),
    path('insights/<int:pk>/delete/', cms_views.insight_delete, name='cms_insight_delete'),
    path('insights/<int:pk>/toggle-visibility/', cms_views.insight_toggle_visibility, name='cms_insight_toggle_visibility'),
    path('insights/category/add/', cms_views.insight_category_edit, name='cms_insight_category_add'),
    path('insights/category/<int:pk>/edit/', cms_views.insight_category_edit, name='cms_insight_category_edit'),
    path('insights/category/<int:pk>/delete/', cms_views.insight_category_delete, name='cms_insight_category_delete'),

    # Auction
    path('auction/', cms_views.auction_list, name='cms_auction'),
    path('auction/add/', cms_views.auction_edit, name='cms_auction_add'),
    path('auction/<int:pk>/edit/', cms_views.auction_edit, name='cms_auction_edit'),
    path('auction/<int:pk>/delete/', cms_views.auction_delete, name='cms_auction_delete'),
    path('auction/<int:pk>/generate/', cms_views.auction_generate_page, name='cms_auction_generate'),

    # Applications — extras a tenant can request from YOUR COMPANY
    path('plugins/', cms_views.tenant_plugins, name='cms_tenant_plugins'),
    path('plugins/<int:pk>/request/', cms_views.tenant_plugin_request, name='cms_tenant_plugin_request'),
    path('applications/', cms_views.applications, name='cms_applications'),
    path('applications/request/', cms_views.application_request, name='cms_application_request'),

    # Fleet — tenant installs, versions and directives
    path('fleet/', cms_views.fleet, name='cms_fleet'),
    path('health/', cms_views.health, name='cms_health'),
    path('health/trend.json', cms_views.health_trend_json, name='cms_health_trend_json'),
    path('health/<int:pk>/', cms_views.health_detail, name='cms_health_detail'),
    path('health/<int:pk>/audit/', cms_views.health_audit, name='cms_health_audit'),
    path('health/<int:pk>/monitor/', cms_views.health_monitor, name='cms_health_monitor'),
    path('fleet/<int:pk>/key/', cms_views.fleet_issue_key, name='cms_fleet_issue_key'),
    path('fleet/<int:pk>/connection/', cms_views.fleet_connection, name='cms_fleet_connection'),

    # Marketplace
    path('marketplace/upgrade/', cms_views.plugin_list, {'mode': 'upgrade'}, name='cms_plugin_upgrades'),
    path('marketplace/upgrade/add/', cms_views.plugin_edit, {'mode': 'upgrade'}, name='cms_plugin_upgrade_add'),
    path('marketplace/plugins/', cms_views.plugin_list, {'mode': 'catalogue'}, name='cms_plugins'),
    path('marketplace/plugins/add/', cms_views.plugin_edit, {'mode': 'catalogue'}, name='cms_plugin_add'),
    path('marketplace/plugins/<int:pk>/edit/', cms_views.plugin_edit, name='cms_plugin_edit'),
    path('marketplace/plugins/<int:pk>/toggle-visibility/', cms_views.plugin_toggle_visibility, name='cms_plugin_toggle_visibility'),
    path('marketplace/plugins/<int:pk>/delete/', cms_views.plugin_delete, name='cms_plugin_delete'),
    path('marketplace/', cms_views.marketplace_list, name='cms_marketplace'),
    path('marketplace/add/', cms_views.marketplace_edit, name='cms_marketplace_add'),
    path('marketplace/<int:pk>/edit/', cms_views.marketplace_edit, name='cms_marketplace_edit'),
    path('marketplace/<int:pk>/delete/', cms_views.marketplace_delete, name='cms_marketplace_delete'),

    # Project Assessments (from website "Start a Project" form)
    path('assessments/', cms_views.assessments_list, name='cms_assessments'),
    path('assessments/<int:pk>/', cms_views.assessment_detail, name='cms_assessment_detail'),
    path('assessments/<int:pk>/estimate/', cms_views.assessment_set_estimate, name='cms_assessment_estimate'),
    path('assessments/<int:pk>/ai-analyse/', cms_views.assessment_ai_analyse, name='cms_assessment_ai_analyse'),
    path('assessments/<int:pk>/quote/', cms_views.assessment_save_quote, name='cms_assessment_save_quote'),
    path('assessments/<int:pk>/send-quote/', cms_views.assessment_send_quote, name='cms_assessment_send_quote'),
    path('assessments/<int:pk>/archive/', cms_views.assessment_archive, name='cms_assessment_archive'),
    path('assessments/<int:pk>/restore/', cms_views.assessment_restore, name='cms_assessment_restore'),
    path('assessments/<int:pk>/delete/', cms_views.assessment_delete, name='cms_assessment_delete'),
    path('assessments/<int:pk>/generate-quote-message/', cms_views.assessment_generate_quote_message, name='cms_assessment_generate_quote_message'),
    path('assessments/<int:pk>/expense-items/add/', cms_views.assessment_add_expense_item, name='cms_assessment_add_expense_item'),
    path('assessments/<int:pk>/expense-items/<int:item_pk>/remove/', cms_views.assessment_remove_expense_item, name='cms_assessment_remove_expense_item'),
    path('assessments/<int:pk>/expense-items/<int:item_pk>/push/', cms_views.assessment_push_expense_item, name='cms_assessment_push_expense_item'),

    # Tickets
    path('tickets/', cms_views.tickets_list, name='cms_tickets'),
    path('tickets/<int:pk>/', cms_views.ticket_detail, name='cms_ticket_detail'),
    path('tickets/<int:pk>/reply/', cms_views.ticket_reply, name='cms_ticket_reply'),
    path('tickets/<int:pk>/ai-draft/', cms_views.ticket_ai_draft, name='cms_ticket_ai_draft'),
    path('tickets/<int:pk>/translate/', cms_views.ticket_translate, name='cms_ticket_translate'),
    path('tickets/<int:pk>/status/', cms_views.ticket_status, name='cms_ticket_status'),
    path('tickets/<int:pk>/archive/', cms_views.ticket_archive, name='cms_ticket_archive'),
    path('tickets/<int:pk>/unarchive/', cms_views.ticket_unarchive, name='cms_ticket_unarchive'),
    path('tickets/<int:pk>/delete/', cms_views.ticket_delete, name='cms_ticket_delete'),
    path('tickets/archive-closed/', cms_views.tickets_archive_closed, name='cms_tickets_archive_closed'),
    path('tickets/<int:pk>/block-sender/', cms_views.ticket_block_sender, name='cms_ticket_block_sender'),
    path('tickets/unblock-email/', cms_views.ticket_unblock_email, name='cms_ticket_unblock_email'),

    # FAQ
    path('faq/', cms_views.faq_list, name='cms_faq'),
    path('faq/category/add/', cms_views.faq_category_edit, name='cms_faq_category_add'),
    path('faq/category/<int:pk>/edit/', cms_views.faq_category_edit, name='cms_faq_category_edit'),
    path('faq/category/<int:pk>/delete/', cms_views.faq_category_delete, name='cms_faq_category_delete'),
    path('faq/item/add/', cms_views.faq_item_edit, name='cms_faq_item_add'),
    path('faq/item/<int:pk>/edit/', cms_views.faq_item_edit, name='cms_faq_item_edit'),
    path('faq/item/<int:pk>/toggle-visibility/', cms_views.faq_item_toggle_visibility, name='cms_faq_item_toggle_visibility'),
    path('faq/item/<int:pk>/delete/', cms_views.faq_item_delete, name='cms_faq_item_delete'),

    # Users
    path('users/', cms_views.users_list, name='cms_users'),
    path('users/add/', cms_views.user_add, name='cms_user_add'),
    path('users/<int:pk>/edit/', cms_views.user_edit, name='cms_user_edit'),
    path('users/<int:pk>/delete/', cms_views.user_delete, name='cms_user_delete'),
    path('users/<int:pk>/toggle-active/', cms_views.user_toggle_active, name='cms_user_toggle_active'),
    path('users/<int:pk>/security/', cms_views.user_security, name='cms_user_security'),
    path('users/<int:pk>/2fa-request/', cms_views.user_send_2fa_request, name='cms_user_2fa_request'),

    # Site Settings
    path('settings/', cms_views.site_settings, name='cms_settings'),
    # Cookie Consent is a paid add-on, so it has its own page rather than a
    # switch inside Settings that most tenants cannot use.
    path('consent/', cms_views.consent_settings, name='cms_consent'),

    # Social Links
    path('social/', cms_views.social_links_list, name='cms_social_links'),
    path('social/add/', cms_views.social_link_edit, name='cms_social_link_add'),
    path('social/<int:pk>/edit/', cms_views.social_link_edit, name='cms_social_link_edit'),
    path('social/<int:pk>/toggle-visibility/', cms_views.social_link_toggle_visibility, name='cms_social_link_toggle_visibility'),
    path('social/<int:pk>/delete/', cms_views.social_link_delete, name='cms_social_link_delete'),

    # Legal Pages
    path('legal/', cms_views.legal_pages_list, name='cms_legal_pages'),
    path('legal/add/', cms_views.legal_page_add, name='cms_legal_page_add'),
    path('legal/<slug:slug>/edit/', cms_views.legal_page_edit, name='cms_legal_page_edit'),
    path('legal/<int:pk>/toggle/', cms_views.legal_page_toggle, name='cms_legal_page_toggle'),
    path('legal/<int:pk>/delete/', cms_views.legal_page_delete, name='cms_legal_page_delete'),

    # Tenants (super admin only)
    path('tenants/', cms_views.tenants_list, name='cms_tenants'),
    path('tenants/add/', cms_views.tenant_edit, name='cms_tenant_add'),
    path('tenants/<int:pk>/edit/', cms_views.tenant_edit, name='cms_tenant_edit'),
    path('tenants/<int:pk>/modules/', cms_views.tenant_modules, name='cms_tenant_modules'),
    path('tenants/<int:pk>/delete/', cms_views.tenant_delete, name='cms_tenant_delete'),
    path('tenants/<int:pk>/archive/', cms_views.tenant_archive, name='cms_tenant_archive'),
    path('tenants/<int:pk>/restore/', cms_views.tenant_restore, name='cms_tenant_restore'),
    path('tenants/<int:pk>/toggle/', cms_views.tenant_toggle_active, name='cms_tenant_toggle'),
    path('tenants/<int:pk>/billing/', cms_views.tenant_billing, name='cms_tenant_billing'),
    path('tenants/<int:pk>/invoices/add/', cms_views.tenant_invoice_add, name='cms_tenant_invoice_add'),
    path('tenants/invoices/<int:invoice_pk>/', cms_views.tenant_invoice_detail, name='cms_tenant_invoice_detail'),
    path('tenants/invoices/<int:invoice_pk>/delete/', cms_views.tenant_invoice_delete, name='cms_tenant_invoice_delete'),
    path('tenants/invoices/<int:invoice_pk>/send/', cms_views.tenant_invoice_send, name='cms_tenant_invoice_send'),
    path('tenants/invoices/<int:invoice_pk>/status/', cms_views.tenant_invoice_status, name='cms_tenant_invoice_status'),
    path('tenants/<int:pk>/plan/', cms_views.tenant_apply_plan, name='cms_tenant_apply_plan'),

    # AI Chat (CMS management)
    path('chat/live/', cms_views.chat_live, name='cms_chat_live'),
    path('chat/live/sessions.json', cms_views.chat_live_sessions_json, name='cms_chat_live_sessions_json'),
    path('chat/sessions/<int:pk>/messages.json', cms_views.chat_session_messages_json, name='cms_chat_session_messages_json'),
    path('chat/sessions/<int:pk>/reply/', cms_views.chat_session_reply, name='cms_chat_session_reply'),
    path('chat/', cms_views.chat_hub, name='cms_chat'),
    path('chat/toggle-enabled/', cms_views.chat_toggle_enabled, name='cms_chat_toggle_enabled'),
    path('chat/close-inactive/', cms_views.chat_close_inactive, name='cms_chat_close_inactive'),
    path('chat/settings/', cms_views.chat_settings, name='cms_chat_settings'),   # legacy redirect
    path('chat/sessions/', cms_views.chat_sessions_list, name='cms_chat_sessions'),  # legacy redirect
    path('chat/sessions/<int:pk>/', cms_views.chat_session_detail, name='cms_chat_session_detail'),
    path('chat/sessions/<int:pk>/delete/', cms_views.chat_session_delete, name='cms_chat_session_delete'),
    path('chat/sessions/<int:pk>/close/', cms_views.chat_session_close, name='cms_chat_session_close'),
    path('chat/archive-closed/', cms_views.chat_archive_closed, name='cms_chat_archive_closed'),

    # Version Management (system admin only)
    path('versions/', cms_views.versions_list, name='cms_versions'),
    path('versions/<int:pk>/upgrade/', cms_views.version_upgrade, name='cms_version_upgrade'),
    path('versions/<int:pk>/upgrade/free/', cms_views.version_upgrade_free, name='cms_version_upgrade_free'),
    path('versions/<int:pk>/upgrade/paid/', cms_views.version_upgrade_paid, name='cms_version_upgrade_paid'),
    path('versions/charge/<int:charge_pk>/status/', cms_views.upgrade_charge_status, name='cms_upgrade_charge_status'),

    # System Info (super admin only)
    path('system/', cms_views.system_info, name='cms_system_info'),

    # Dismiss notification bar
    path('notifications/dismiss/', cms_views.notifications_dismiss, name='cms_notifications_dismiss'),

    # Generic drag-sort endpoint (used by all sortable lists)
    path('sort/', cms_views.sort_items, name='cms_sort_items'),

    # Ecommerce — Products & Subscriptions
    path('products/', cms_views.products_list, name='cms_products'),
    path('subscriptions/', cms_views.subscriptions_list, name='cms_subscriptions'),
    path('subscriptions/add/', cms_views.subscription_edit, name='cms_subscription_add'),
    path('subscriptions/<int:pk>/edit/', cms_views.subscription_edit, name='cms_subscription_edit'),
    path('products/interests/', cms_views.product_interests_list, name='cms_product_interests'),
    path('products/add/', cms_views.product_edit, name='cms_product_add'),
    path('products/<int:pk>/edit/', cms_views.product_edit, name='cms_product_edit'),
    path('products/<int:pk>/delete/', cms_views.product_delete, name='cms_product_delete'),
    path('products/<int:pk>/delete-image/', cms_views.product_image_delete, name='cms_product_image_delete'),
    path('products/<int:pk>/toggle-visibility/', cms_views.product_toggle_visibility, name='cms_product_toggle_visibility'),
    path('products/<int:pk>/toggle-shop/', cms_views.product_toggle_show_in_shop, name='cms_product_toggle_shop'),
    path('products/sort/', cms_views.products_sort, name='cms_products_sort'),
    path('products/category/add/', cms_views.product_category_edit, name='cms_product_category_add'),
    path('products/category/<int:pk>/edit/', cms_views.product_category_edit, name='cms_product_category_edit'),
    path('products/category/<int:pk>/delete/', cms_views.product_category_delete, name='cms_product_category_delete'),

    # Ecommerce — Orders
    path('orders/', cms_views.orders_list, name='cms_orders'),
    path('orders/<int:pk>/', cms_views.order_detail_cms, name='cms_order_detail'),
    path('orders/<int:pk>/send-deal/', cms_views.order_send_deal, name='cms_order_send_deal'),
    path('orders/<int:pk>/refund/', cms_views.order_refund_cms, name='cms_order_refund'),

    # Email Log
    path('emails/', cms_views.email_log_list, name='cms_email_log'),
    path('emails/<int:pk>/', cms_views.email_log_detail, name='cms_email_log_detail'),
    path('emails/<int:pk>/resend/', cms_views.email_resend, name='cms_email_resend'),
    path('emails/<int:pk>/archive/', cms_views.email_log_archive, name='cms_email_log_archive'),
    path('emails/<int:pk>/restore/', cms_views.email_log_restore, name='cms_email_log_restore'),
    path('emails/<int:pk>/delete/', cms_views.email_log_delete, name='cms_email_log_delete'),
    path('emails/templates/', cms_views.email_templates_list, name='cms_email_templates'),
    path('emails/templates/<str:key>/edit/', cms_views.email_template_edit, name='cms_email_template_edit'),

    # Ecommerce — Expenses
    path('expenses/', cms_views.expenses_list, name='cms_expenses'),
    path('expenses/add/', cms_views.expense_edit, name='cms_expense_add'),
    path('expenses/<int:pk>/edit/', cms_views.expense_edit, name='cms_expense_edit'),
    path('expenses/<int:pk>/delete/', cms_views.expense_delete, name='cms_expense_delete'),

    # Backups
    path('backups/', cms_views.backup_list, name='cms_backup'),
    path('backups/create/', cms_views.backup_create, name='cms_backup_create'),
    path('backups/<str:filename>/download/', cms_views.backup_download, name='cms_backup_download'),
    path('backups/<str:filename>/delete/', cms_views.backup_delete, name='cms_backup_delete'),
    path('backups/<str:filename>/undo/', cms_views.backup_undo, name='cms_backup_undo'),
    path('backups/<str:filename>/purge/', cms_views.backup_purge, name='cms_backup_purge'),
    path('backups/<str:filename>/restore/', cms_views.backup_restore, name='cms_backup_restore'),

    # Media Hub
    path('library/', include('apps.media.cms_urls')),

    # Footer Tagline
    path('footer/tagline/', cms_views.footer_tagline_edit, name='cms_footer_tagline'),

    # Footer Links
    path('footer/', cms_views.footer_links_list, name='cms_footer_links'),
    path('footer/add/', cms_views.footer_link_edit, name='cms_footer_link_add'),
    path('footer/sort/', cms_views.footer_links_sort, name='cms_footer_links_sort'),
    path('footer/<int:pk>/edit/', cms_views.footer_link_edit, name='cms_footer_link_edit'),
    path('footer/<int:pk>/toggle/', cms_views.footer_link_toggle, name='cms_footer_link_toggle'),
    path('footer/<int:pk>/delete/', cms_views.footer_link_delete, name='cms_footer_link_delete'),
]
