from django.urls import include, path
from rest_framework.routers import DefaultRouter
from .views import (
    InvoiceMatchViewSet,
    ProcurementReportView,
    PurchaseOrderViewSet,
    PurchaseRequisitionViewSet,
    QuotationViewSet,
    RFQViewSet,
    VendorViewSet,
)

router = DefaultRouter()
router.register("vendors", VendorViewSet, basename="vendor")
router.register("requisitions", PurchaseRequisitionViewSet, basename="requisition")
router.register("rfqs", RFQViewSet, basename="rfq")
router.register("quotations", QuotationViewSet, basename="quotation")
router.register("orders", PurchaseOrderViewSet, basename="purchase-order")
router.register("invoice-matching", InvoiceMatchViewSet, basename="invoice-matching")

urlpatterns = [
    path("reports/", ProcurementReportView.as_view(), name="procurement-reports"),
    path("", include(router.urls)),
]
