from django.urls import path
from . import views

urlpatterns = [
    path('', views.home, name='home'),
    path('activate/', views.activate_system, name='activate_system'),
    path('dashboard/', views.dashboard, name='dashboard'),
    path('settings/', views.system_settings, name='system_settings'),
    path('field-builder/', views.field_builder, name='field_builder'),
    path('field-builder/field/<int:field_id>/edit/', views.edit_field, name='edit_field'),
    path('field-builder/field/<int:field_id>/delete/', views.delete_field, name='delete_field'),
    path('dynamic-form/', views.dynamic_form_test, name='dynamic_form_test'),
    path('api/form-data/<str:content_type>/<int:object_id>/', views.get_form_data, name='get_form_data'),

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

    # ✅ 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'),
]
