from django.urls import path
from django.contrib.auth import views as auth_views
from . import views

urlpatterns = [
    path('signup/', views.signup, name='signup'),
    path('login/', auth_views.LoginView.as_view(template_name='core/login.html'), name='login'),
    path('logout/', views.logout_view, name='logout'),
    path('dashboard/', views.dashboard, name='dashboard'),
    path('create_company/', views.create_company, name='create_company'),
    path('company/<int:company_id>/tenders/', views.tender_list, name='tender_list'),
    path('tender/<int:tender_id>/', views.tender_detail, name='tender_detail'),
    path('tender/<int:tender_id>/update_status/<str:next_status>/', views.update_tender_status, name='update_tender_status'),
    path('company/<int:company_id>/create_tender/', views.create_tender, name='create_tender'),
    path('tender/<int:tender_id>/update/', views.update_tender, name='update_tender'),
    path('tender/<int:tender_id>/delete/', views.delete_tender, name='delete_tender'),
    path('tender/<int:tender_id>/create_bid/', views.create_bid, name='create_bid'),
    path('bid/<int:bid_id>/update/', views.update_bid, name='update_bid'),
    path('bid/<int:bid_id>/delete/', views.delete_bid, name='delete_bid'),
    path('bid/<int:bid_id>/approve/', views.approve_bid, name='approve_bid'),
    path('', views.home, name='home'),
]