from django.urls import path
from .views import (
    AddOrUpdateCartView,
    DiscountDetailView,
    DiscountsListView,
    RemoveFromCartView,
    GetCartView,
    DeliverySlotSelectionView,
    CheckoutAPIView,
    CustomOrderCheckoutAPIView,
    CouponsListView,
    VerifyPaymentAPIView,
    PastOrdersListAPIView,
    PastOrderDetailAPIView,
    AddressChangeView,
    FlushCartView,
    AdListAPIView,
    Customorder_placing,
    NotificationListView
)

urlpatterns = [
    path(
        "cart/add-or-update/", AddOrUpdateCartView.as_view(), name="add-or-update-cart"
    ),
    path(
        "cart/remove/<int:cart_item_id>/",
        RemoveFromCartView.as_view(),
        name="remove-from-cart",
    ),
    path("cart/", GetCartView.as_view(), name="get-cart"),
    path(
        "delivery-slots/",
        DeliverySlotSelectionView.as_view(),
        name="delivery_slot_selection",
    ),
    path("checkout/", CheckoutAPIView.as_view(), name="checkout"),
    path("custom_order_checkout/", CustomOrderCheckoutAPIView.as_view(), name = "custom-order-checkout"),
    path("coupons/", CouponsListView.as_view(), name="coupons-list"),
    path("verifypayment/", VerifyPaymentAPIView.as_view(), name="verify_payment"),
    path("past-orders/", PastOrdersListAPIView.as_view(), name="past-orders-list"),
    path(
        "past-orders/<uuid:order_uuid>/",
        PastOrderDetailAPIView.as_view(),
        name="past-order-detail",
    ),
    path(
        "address-change/", AddressChangeView.as_view(), name="address-change"  
    ),
    path('cart/flush/', FlushCartView.as_view(), name='flush_cart'),
    path("ad-list/", AdListAPIView.as_view(), name= "ad_list"),
    path('discounts/', DiscountsListView.as_view(), name='discounts-list'),
    path('discounts/<int:discount_id>/', DiscountDetailView.as_view(), name='discount-detail'),
    path('customorder/<int:id>/', Customorder_placing.as_view(), name='custom_order_create'),
    path('notification_history/', NotificationListView.as_view(), name= 'notification_history')
]
