from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from . import views

app_name = "seller"

urlpatterns = [
    path('profile/', views.CreateProfile.as_view(), name="create_profile"),
    path('<int:pk>/profile/', views.RetrieveUpdateProfile.as_view(), name="retrieve_update_profile"),
    path('<int:seller>/warehouse/', views.ListCreateWarehouse.as_view(), name="list_create_warehouse"),
    path('<int:seller>/warehouse/<int:pk>/', views.RetrieveUpdateWarehouse.as_view(), name="retrieve_update_warehouse"),
    path('<int:seller>/company/<int:pk>/', views.RetrieveUpdateCompany.as_view(), name="retrieve_update_company"),
    path('<int:seller>/fields/', views.ListCreateSellerFields.as_view(), name="list_create_seller_fields"),
    path('<int:seller>/fields-generalized/', views.RetrieveSellerFields.as_view(), name="get_seller_fields"),
    path('<int:seller>/documents/', views.ListCreateDocuments.as_view(), name="list_create_documents"),
    path('<int:seller>/documents/<int:pk>/', views.DeleteDocument.as_view(), name="delete_document"),
    path('<int:seller>/notifications/', views.ListNotifications.as_view(), name="list_notifications"),
    path('<int:seller>/price-basis/', views.ListPriceBasis.as_view(), name="list_basis"),
    path('<int:seller>/base-<int:base>/competition', views.CreateCompetition.as_view(), name="competition"),
    path('<int:seller>/inquiries', views.ListInquiries.as_view(), name="list_inquiries"),
    path('<int:seller>/sales', views.ListOrderDetails.as_view(), name="list_sales"),
    path('check-duplication/', views.CheckDuplication.as_view(), name='seller_duplication'),
    path('<int:seller>/contract/', views.RetrieveContract.as_view(), name="get_seller_contract"),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
