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

urlpatterns = [
    path("", views.home, name="home"),
    path("register/", views.register, name="register"),
    path("verify-otp-registration/", views.verify_otp_registration, name="verify_otp_registration"),
    path("login/", views.custom_login, name="login"),
    path("verify-otp-login/", views.verify_otp_login, name="verify_otp_login"),
    path("logout/", auth_views.LogoutView.as_view(), name="logout"),
    path("dashboard/", views.dashboard, name="dashboard"),
    path("truck/register/", views.truck_register, name="truck_register"),
    path("truck/<int:truck_id>/edit/", views.edit_truck, name="edit_truck"),
    path("truck/<int:truck_id>/approve/", views.approve_truck, name="approve_truck"),
    path("truck/<int:truck_id>/suspend/", views.suspend_truck, name="suspend_truck"),
    path("shipment/post/", views.post_shipment, name="post_shipment"),
    path("marketplace/", views.marketplace, name="marketplace"),
    path("shipment/<int:shipment_id>/", views.shipment_detail, name="shipment_detail"),
    path("truck/<int:truck_id>/offer/", views.place_bid, name="place_bid"),
    path("bid/<int:bid_id>/accept/", views.accept_bid, name="accept_bid"),
    path("bid/<int:bid_id>/reject/", views.reject_bid, name="reject_bid"),
]