"""
Urs registrations for eggs app
"""

from django import urls
from rest_framework import routers

from core.apps.eggs import views
from core.apps.eggs.views import MonthlyBenefitView, DeleteAccountView

router = routers.DefaultRouter()

router.register(r"debt", views.DebtViewSet, basename="debt")
router.register(r"party", views.PartViewSet, basename="party")
router.register(r"group", views.GroupViewSet, basename="group")
router.register(r"order", views.OrderViewSet, basename="order")
router.register(r"broken", views.BrokenViewSet, basename="broken")
router.register(r"market", views.MarketViewSet, basename="market")
router.register(r"history", views.HistoryViewSet, basename="history")
router.register(r"courier", views.CourierViewSet, basename="courier")
router.register(r"product", views.ProductViewSet, basename="product")
router.register(r"add-market", views.AddMarketView, basename="add-market")
router.register(r"daily-cost", views.DailyCostViewSet, basename="daily-cost")
router.register(
    r"all-history", views.AllHistoryViewSet, basename="all-history"
)  # noqa
router.register(
    r"add-courier", views.AddCourierViewSet, basename="add-courier"
)  # noqa
router.register(
    r"add-sklad", views.AddSkladViewSet, basename="add-sklad"
)  # noqa
router.register(
    r"market-history", views.MarketHistoryViewSet, basename="market-history"
)  # noqa
router.register(
    r"courier-product", views.CourierProductViewSet, basename="courier-product"
)  # noqa
router.register(
    r"courier-history", views.CourierHistoryViewSet, basename="courier-history"
)  # noqa

urlpatterns = [
    urls.path("", urls.include(router.urls)),
    urls.path(
        "top_couriers/", views.TopCourierView.as_view(), name="top_couriers"
    ),
    urls.path(
        "top_products/", views.TopProductsView.as_view(), name="top_products"
    ),
    urls.path(
        route="return_eggs/",
        view=views.ReturnEggsViewSet.as_view({"put": "update"}),
        name="return_eggs",
    ),
    urls.path(
        "additional_cost/",
        views.AdditionalCostView.as_view(),
        name="add_additional_cost",
    ),
    urls.path(
        "add_debt/",
        views.AddDebtView.as_view(),
        name="add_debt",
    ),
    urls.path(
        "monthly-benefit/",
        MonthlyBenefitView.as_view(),
        name="monthly-benefit",
    ),
    urls.path(
        "debt-list/<int:id>/",
        views.UserDebtsAPIView.as_view(),
        name="debt-history",
    ),
    # urls.path(
    #     'history/<int:content_type_id>/<int:object_id>/',
    #     views.HistoryDetailView.as_view(),
    #     name='history-detail'
    # ),
    urls.path(
        "monitoring/summary/",
        views.MonitoringSummaryView.as_view(),
        name="monitoring-summary",
    ),
    urls.path(
        "auth/delete-account/",
        DeleteAccountView.as_view(),
        name="delete-account",
    ),
]
