"""Establishment url patterns for backoffice."""

from django.urls import path

from establishment import views

app_name = 'establishment'

urlpatterns = [
    path('', views.EstablishmentListCreateView.as_view(), name='list'),
    path('slug/<slug:slug>/', views.EstablishmentRUDView.as_view(), name='detail'),
    path('slug/<slug:slug>/carousels/', views.EstablishmentCarouselCreateDestroyView.as_view(),
         name='create-destroy-carousels'),
    path('slug/<slug:slug>/schedule/<int:schedule_id>/', views.EstablishmentScheduleRUDView.as_view(),
         name='schedule-rud'),
    path('slug/<slug:slug>/schedule/', views.EstablishmentScheduleCreateView.as_view(),
         name='schedule-create'),
    path('slug/<slug:slug>/gallery/', views.EstablishmentGalleryListView.as_view(),
         name='gallery-list'),
    path('slug/<slug:slug>/gallery/<int:image_id>/',
         views.EstablishmentGalleryCreateDestroyView.as_view(),
         name='gallery-create-destroy'),
    path('slug/<slug:slug>/companies/', views.EstablishmentCompanyListCreateView.as_view(),
         name='company-list-create'),
    path('slug/<slug:slug>/companies/<int:company_pk>/', views.EstablishmentCompanyRUDView.as_view(),
         name='company-rud'),
    path('slug/<slug:slug>/notes/', views.EstablishmentNoteListCreateView.as_view(),
         name='note-list-create'),
    path('slug/<slug:slug>/notes/<int:note_pk>/', views.EstablishmentNoteRUDView.as_view(),
         name='note-rud'),
    path('slug/<slug:slug>/admin/', views.EstablishmentAdminView.as_view(),
         name='establishment-admin-list'),
    path('menus/', views.MenuListCreateView.as_view(), name='menu-list'),
    path('menus/<int:pk>/', views.MenuRUDView.as_view(), name='menu-rud'),
    path('plates/', views.PlateListCreateView.as_view(), name='plates'),
    path('plates/<int:pk>/', views.PlateRUDView.as_view(), name='plate-rud'),
    path('social_choice/', views.SocialChoiceListCreateView.as_view(), name='socials_choice'),
    path('social_choice/<int:pk>/', views.SocialChoiceRUDView.as_view(), name='socials_choice-rud'),
    path('socials/', views.SocialListCreateView.as_view(), name='socials'),
    path('socials/<int:pk>/', views.SocialRUDView.as_view(), name='social-rud'),
    path('phones/', views.PhonesListCreateView.as_view(), name='phones'),
    path('phones/<int:pk>/', views.PhonesRUDView.as_view(), name='phones-rud'),
    path('emails/', views.EmailListCreateView.as_view(), name='emails'),
    path('emails/<int:pk>/', views.EmailRUDView.as_view(), name='emails-rud'),
    path('<int:establishment_id>/employees/', views.EstablishmentEmployeeListView.as_view(),
         name='establishment-employees'),
    path('employees/', views.EmployeeListCreateView.as_view(), name='employees'),
    path('employees/<int:pk>/', views.EmployeeRUDView.as_view(), name='employees-rud'),
    path('<int:establishment_id>/employee/<int:employee_id>/position/<int:position_id>',
         views.EstablishmentEmployeeCreateView.as_view(),
         name='employees-establishment-create'),
    path('<int:establishment_id>/employee/<int:employee_id>',
         views.EstablishmentEmployeeDeleteView.as_view(),
         name='employees-establishment-delete'),
    path('types/', views.EstablishmentTypeListCreateView.as_view(), name='type-list'),
    path('types/<int:pk>/', views.EstablishmentTypeRUDView.as_view(), name='type-rud'),
    path('subtypes/', views.EstablishmentSubtypeListCreateView.as_view(), name='subtype-list'),
    path('subtypes/<int:pk>/', views.EstablishmentSubtypeRUDView.as_view(), name='subtype-rud'),
    path('positions/', views.EstablishmentPositionListView.as_view(), name='position-list'),
]
