from django.urls import path
from . import views

urlpatterns = [
    path('', views.home, name='home'),
    path('register/', views.register_view, name='register'),
    path('login/', views.login_view, name='login'),
    path('logout/', views.logout_view, name='logout'),
    
    path('company-setup/', views.company_setup, name='company_setup'),
    path('dashboard/', views.dashboard, name='dashboard'),
    
    # Jobs
    path('jobs/', views.job_list, name='job_list'),
    path('jobs/create/', views.job_create, name='job_create'),
    path('jobs/<int:pk>/', views.job_detail, name='job_detail'),
    path('jobs/<int:pk>/edit/', views.job_update, name='job_update'),
    path('jobs/<int:pk>/delete/', views.job_delete, name='job_delete'),
    path('jobs/<int:pk>/toggle-folder/<int:folder_id>/', views.toggle_folder_completion, name='toggle_folder_completion'),
    path('jobs/<int:pk>/upload-file/<int:folder_id>/', views.job_upload_file, name='job_upload_file'),
    path('jobs/<int:pk>/delete-file/<int:file_id>/', views.job_delete_file, name='job_delete_file'),
    path('jobs/export/', views.job_export, name='job_export'),
    path('jobs/import/', views.job_import, name='job_import'),
    
    # Settings
    path('settings/', views.settings_view, name='settings'),
    path('settings/status/create/', views.status_create, name='status_create'),
    path('settings/status/<int:pk>/edit/', views.status_update, name='status_update'),
    path('settings/status/<int:pk>/delete/', views.status_delete, name='status_delete'),
    path('settings/folder/create/', views.folder_create, name='folder_create'),
    path('settings/folder/<int:pk>/delete/', views.folder_delete, name='folder_delete'),
    path('settings/clients/', views.client_list, name='client_list'),
    path('settings/clients/create/', views.client_create, name='client_create'),
    path('settings/clients/<int:pk>/edit/', views.client_update, name='client_update'),
    path('settings/clients/<int:pk>/delete/', views.client_delete, name='client_delete'),

    # User Management
    path('settings/invite-user/', views.invite_user, name='invite_user'),
    path('settings/users/', views.user_list, name='user_list'),
    path('settings/users/<int:pk>/update-role/', views.user_update_role, name='user_update_role'),
    path('settings/users/<int:pk>/delete/', views.user_delete, name='user_delete'),
    path('accept-invite/<str:token>/', views.accept_invite, name='accept_invite'),
]