from django.urls import path
from . import views

app_name = "recycle_core"

urlpatterns = [
    # Users (owner-only)
    path("org-users/", views.org_users_list, name="org_users_list"),
    path("org-users/new/", views.org_user_create, name="org_user_create"),
    path("org-users/<int:pk>/edit/", views.org_user_edit, name="org_user_edit"),
    path("org-users/<int:pk>/delete/", views.org_user_delete, name="org_user_delete"),
    path("materials/", views.materials_list, name="materials_list"),
    path("materials/<int:pk>/edit/", views.material_edit, name="material_edit"),
    path("materials/<int:pk>/delete/", views.material_delete, name="material_delete"),

    path("customers/", views.customers_list, name="customers_list"),
    path("customers/<int:pk>/edit/", views.customer_edit, name="customer_edit"),
    path("customers/<int:pk>/delete/", views.customer_delete, name="customer_delete"),

    path("pickups/", views.pickups_list, name="pickups_list"),
    path("pickups/<int:pk>/assign/", views.pickup_assign, name="pickup_assign"),
    path("pickups/<int:pk>/set-status/", views.pickup_set_status, name="pickup_set_status"),
    path("pickups/<int:pk>/generate-invoice/", views.pickup_generate_invoice, name="pickup_generate_invoice"),

    path("scrap-listings/", views.scrap_listings_list, name="scrap_listings_list"),
    path("scrap-listings/<int:pk>/open/", views.scrap_listing_open, name="scrap_listing_open"),
    path("scrap-listings/<int:pk>/close/", views.scrap_listing_close, name="scrap_listing_close"),
    path("scrap-listings/<int:pk>/award/", views.scrap_listing_award, name="scrap_listing_award"),

    path("weigh-tickets/", views.weigh_tickets_list, name="weigh_tickets_list"),
    path("weigh-tickets/<int:pk>/", views.weigh_ticket_detail, name="weigh_ticket_detail"),
    path("weigh-tickets/<int:pk>/generate-invoice/", views.weigh_ticket_generate_invoice, name="weigh_ticket_generate_invoice"),

    path("invoices/", views.invoices_list, name="invoices_list"),
    path("invoices/<int:pk>/add-payment/", views.invoice_add_payment, name="invoice_add_payment"),

    path("documents/", views.documents_list, name="documents_list"),
    path("audit-logs/", views.audit_logs_list, name="audit_logs_list"),
    path("audit-logs/export/", views.audit_logs_export_csv, name="audit_logs_export_csv"),
    path("payouts/", views.payouts_list, name="payouts_list"),
    path("payouts/export/", views.payouts_export_csv, name="payouts_export_csv"),
]
