from django.urls import path
from . import views
from .views import *
from django.conf import settings


urlpatterns = [
    path("login/", views.login),
    path("homepage/", views.home_page, name="homepage"),
    path("sales_unit/shops/", views.shop_list, name="shop_list"),
    path("sales_unit/shop/<str:shop_id>/delete/", views.shop_delete, name="delete_shop"),
    path("sales_unit/shop/add/", views.shop_add, name="add_shop"),
    path("sales_unit/shop/<str:shop_id>/edit/", views.shop_edit, name="edit_shop"),
    path("users/", views.users, name="users"),
    path("user/<str:user_id>/edit/", views.user_edit, name="edit-user"),
    path("user/add/", views.user_add, name="add-user"),
    path("user/<str:user_id>/delete/", views.user_delete, name="delete-user"),
    path("user/shop_admin_add/", views.user_add_modal, name="add-user-modal"),
    path("user/logout/",views.admin_logout, name = "logout"),
    path("user/<str:user_id>/reset_password/", views.reset_password, name= "reset_password"),
    path("categories/", views.category_list, name = "list_category"),
    path("add-category/", views.add_category, name = "add_category"),
    path("edit-category/<str:category_id>/", views.category_edit, name = "edit_category"),
    path("add-sub-category/<str:category_id>/", views.add_sub_category, name = "add_sub_category"),
    path("create-sub-category/<str:category_id>/", views.sub_category_creation, name = "sub_category_creation"),
    path("delete-category/<str:category_id>/delete", views.category_delete, name = "delete_category"),
    path("delete-sub-category/<str:sub_category_id>/delete/", views.sub_category_delete, name = "delete_sub_category_id"),
    path("edit-sub-category-row/<str:sub_category_id>/edit", views.edit_sub_category_row, name="sub_category_edit_row"),
    path("master-products/", views.master_product_list, name= "list_master_product"),
    path("master-products/add/", views.master_product_add, name= "add_master_product"),
    path("master-products/<str:product_id>/edit", views.master_product_edit, name= "edit_master_product"),
    path("master-products/<str:product_id>/delete", views.master_product_delete, name = "delete_master_product"),
    path('master-products/category_list', views.load_subcategories, name = "sub_category_list"),
    path('products/category_list', views.load_subcategories_product, name = "sub_category_list_product"),
    path("subcategory_products/", views.subcategory_product_list, name = "sub_category_product_list"),
    path("shop-products/<str:shop_id>/<str:product_type>/", views.product_list, name= "list_shop_product"),
    path('update_status/', views.update_product_sales_status, name='update_status'),
    path('bulk_update_status/<str:shop_id>/', views.category_based_update_status, name= "bulk_update"),
    path("products-shop-admin/", views.product_list, name= "list_product_shop_admin"),
    path('update_status_shop_admin/', views.update_product_product_admin_status, name='update_status_shop_admin'),
    path('bulk_update_shop_admin_status/<str:shop_id>/', views.category_based_shop_admin_update_status, name= "bulk_update_shop_admin"),
    path('delete_image/<int:image_id>/', views.delete_image, name='delete_image'),
    path('delete_video/<int:video_id>/', views.delete_video, name='delete_video'),
    path('category/image_field/', views.image_field_rendering, name="image_render_category"),
    path('category/image_field_promotions', views.image_field_style, name = 'image_render'),
    path('tags/', views.tag_list, name="tag_list"),
    path('tags/add/', views.tag_add, name="tag_add"),
    path('tags/<str:tag_id>/edit', views.tag_edit, name="tag_edit"),
    path('tags/<str:tag_id>/delete', views.tag_delete, name="tag_delete"),
    path('dynamic-filter/', views.dynamic_filter_list, name="filter_list"),
    path('dynamic-filter/add/', views.dynamic_filter_add, name="filter_add"),
    path('dynamic-filter/<str:filter_id>/edit', views.dynamic_filter_edit, name="filter_edit"),
    path('dynamic-filter/<str:filter_id>/delete', views.dynamic_filter_delete, name="filter_delete"),
    path('special-list/', views.special_list, name="special_list"),
    path('special-list/add/', views.special_list_add, name="special_list_add"),
    path('special-list/<str:special_list_id>/edit', views.special_list_edit, name="special_list_edit"),
    path('special-list/<str:special_list_id>/delete', views.special_list_delete, name="special_list_delete"),
    path('delivery-boy-list/', views.delivery_boy_list, name="delivery_boy_list"),
    path('delivery-boy/add/', views.delivery_boy_add, name="delivery_boy_add"),
    path('delivery-boy/<str:delivery_boy_id>/edit', views.delivery_boy_edit, name="delivery_boy_edit"),
    path('delivery-boy/<str:delivery_boy_id>/delete', views.delivery_boy_delete, name="delivery_boy_delete"),
    path("send-verification-email/<str:delivery_boy>/", views.SendVerificationEmailView.as_view(), name="send-verification-email"),
    path("verify-phone/<str:token>/", views.VerifyEmailView.as_view(),name="verify-phone"),
    path('orders/', views.order_list, name="order_list"),
    path('orders/<str:order_id>', views.order_list, name="order_post"),
    path('add-sku/<int:product_id>/', views.add_sku, name='add_sku'),
    path('delete-sku/', views.delete_sku, name='delete_sku'),
    path('get-skus/<int:product_id>/', views.get_skus, name='get_skus'),
    path('get-sku/<int:sku_id>/', views.get_sku, name='get_sku'),
    path('update-sku/<int:sku_id>/', views.update_sku, name='update_sku'),
    path('update-sku-product-list/<int:sku_id>/', views.update_sku_from_product_list, name='update_sku'),
    path('search_shipper/', views.ShipperAutocomplete.as_view(), name='shipper_autocomplete_api'),
    path('save_shipper/',views.save_shipper,name="save_shipper"),
    path('edit-order-product/<str:order_id>/', views.courier_details_edit, name = "edit_courier_details"),
    path('save_order_status/',views.save_order_status,name="save_order_status"),
    path('update-order-status-viewed/<str:orderID>/',views.order_status_update_to_viewed, name = "save_viewed_order_status"),
    path('coupons/', views.coupon_list, name= "list_coupons"),
    path("promotions/coupon/<str:coupon_id>/delete/", views.coupon_delete, name="delete_coupon"),
    path("promotions/coupon/add/", views.coupon_add, name="add_coupon"),
    path('promotions/coupon/<str:coupon_id>/edit/', views.coupon_edit, name="edit_coupon"),
    path('delivery_slot/list/', views.delivery_slot_list, name="delivery_slot_list"),
    path('delivery_slot/add/', views.delivery_slot_add, name="delivery_slot_add"),
    path('delivery_slot/<str:delivery_slot_id>/edit', views.delivery_slot_edit, name="delivery_slot_edit"),
    path('delivery_slot/<str:delivery_slot_id>/delete', views.delivery_slot_delete, name="delivery_slot_delete"),
    path('discounts/', views.discount_list, name="list_discounts"),
    path("promotions/discount/<str:discount_id>/delete/", views.discount_delete, name="delete_discount"),
    path("promotions/discount/add/", views.discount_add, name="add_discount"),
    path('promotions/discount/<str:discount_id>/edit/', views.discount_edit, name="edit_discount"),
    path('ads/', views.ad_list, name="list_ad"),
    path("promotions/ads/<str:ad_id>/delete/", views.ad_delete, name="delete_ad"),
    path("promotions/ads/add/", views.ad_add, name="add_ad"),
    path('promotions/ads/<str:ad_id>/edit/', views.ad_edit, name="edit_ad"),
    path('custom-products/', views.custom_product_listing, name='custom_product_listing'),
    path('add-custom-product/', views.custom_product_add, name='custom_product_add'),
    path('delete-custom-product/<int:product_id>/', views.delete_custom_product, name='delete_custom_product'),
    path('edit-custom-product/<int:product_id>/', views.custom_product_edit, name='custom_product_edit'),
    path('custom_product/<int:product_id>/delete_image/<int:image_id>/', views.delete_custom_image, name='delete_custom_image'),
    path('custom_product/<int:product_id>/delete_video/<int:video_id>/', views.delete_custom_video, name='delete_custom_video'),
    path("sales_unit/pu/", views.production_unit, name="production_unit_list"),
    path("sales_unit/pu/<str:pu_id>/delete/", views.production_unit_delete, name="delete_production_unit"),
    path("sales_unit/pu/add/", views.production_unit_add, name="add_production_unit"),
    path("sales_unit/pu/<str:pu_id>/edit/", views.production_unit_edit, name="edit_production_unit"),
    path("faq/", views.faq, name="faq"),
    path('faq/add/', views.add_faq, name='add_faq'), 
    path('faq/edit/<int:faq_id>/', views.edit_faq, name='edit_faq'), 
    path('faq/delete/<int:faq_id>/', views.delete_faq, name='delete_faq'),
    path("about_us/", views.about_us, name="about_us"),
    path('admin/privacy-policy/', views.privacy_policy_view, name='privacy_policy'),
    path('admin/terms-and-conditions/', views.terms_conditions_view, name='terms_and_conditions'),
    path("delivery_settings/", views.delivery_settings, name="delivery_settings"),
    path('custom_orders/', views.custom_orders, name = "custom_orders"),
    path('custom_orders/order_detail', views.custom_order_edit, name="custom_order_post"),
    path("system_settings/", views.system_settings, name="system-settings"),
    path("choice_list/", views.choice_list, name = "choice-list"),
    path("color_change/", views.my_polling_task, name="order-color-change"),
    # path("list_communications/",views.list_communication,name="communication_list")
    path("communication/",views.list_communication,name="communication_list"),
    path("send_message/", views.send_message,name="send_msg"),
    path('save_customorder_status/',views.save_customorder_status,name="save_customorder_status"),
    path('save_customorder_data/',views.save_customorder_data,name="save_customorder_data"),
    path('coupon_subcategory_list/', views.coupon_subcategory_list, name = "coupon_sub_category_list"),
    path('save_status_to_delivered/<str:orderID>/<str:status>', views.order_status_update_to_delivered, name= "save-status-to-delivered"),
    path("you_may_also_like/", views.you_may_also_like_list, name = "you-may-also-like"),
    path("you_may_also_like/add/", views.you_may_also_like_add, name= "you-may-also-like-add"),
    path("you_may_also_like/edit/<int:id>/", views.you_may_also_like_edit, name = "you-may-also-like-edit"),
    path("you_may_also_like/delete/<int:id>/",views.you_may_also_like_delete, name= "you-may-also-like-delete" ),
    path('settings/delivery/', views.delivery_settings_view, name='delivery_settings'),
    path('coupon_settings/', views.coupon_settings_view, name="coupon-settings"),

]
