from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import (
    PdfOperationViewSet,
    CompressPdfView,
    ProtectPdfView,
    UnlockPdfView,
    RepairPdfView,
    WatermarkPdfView,
    ExtractTextView,
    PdfToWordView,
    PdfToExcelView,
    PdfToPowerpointView,
    WordToPdfView,
    ExcelToPdfView,
    PowerpointToPdfView,
    ImagesToPdfView,
    TextToPdfView,
    HtmlToPdfView,
    RedactPdfView,
)

router = DefaultRouter()
router.register(r"pdf-operations", PdfOperationViewSet, basename="pdfoperation")

urlpatterns = [
    path("", include(router.urls)),
    path("pdf-tools/compress/",          CompressPdfView.as_view(),       name="pdf-compress"),
    path("pdf-tools/protect/",           ProtectPdfView.as_view(),        name="pdf-protect"),
    path("pdf-tools/unlock/",            UnlockPdfView.as_view(),         name="pdf-unlock"),
    path("pdf-tools/repair/",            RepairPdfView.as_view(),         name="pdf-repair"),
    path("pdf-tools/watermark/",         WatermarkPdfView.as_view(),      name="pdf-watermark"),
    path("pdf-tools/extract-text/",      ExtractTextView.as_view(),       name="pdf-extract-text"),
    path("pdf-tools/to-word/",           PdfToWordView.as_view(),         name="pdf-to-word"),
    path("pdf-tools/to-excel/",          PdfToExcelView.as_view(),        name="pdf-to-excel"),
    path("pdf-tools/to-powerpoint/",     PdfToPowerpointView.as_view(),   name="pdf-to-powerpoint"),
    path("pdf-tools/word-to-pdf/",       WordToPdfView.as_view(),         name="word-to-pdf"),
    path("pdf-tools/excel-to-pdf/",      ExcelToPdfView.as_view(),        name="excel-to-pdf"),
    path("pdf-tools/powerpoint-to-pdf/", PowerpointToPdfView.as_view(),   name="powerpoint-to-pdf"),
    path("pdf-tools/images-to-pdf/",     ImagesToPdfView.as_view(),       name="images-to-pdf"),
    path("pdf-tools/text-to-pdf/",       TextToPdfView.as_view(),         name="text-to-pdf"),
    path("pdf-tools/html-to-pdf/",       HtmlToPdfView.as_view(),         name="html-to-pdf"),
    path("pdf-tools/redact/",            RedactPdfView.as_view(),         name="pdf-redact"),
]
