"""URL routing for the Discord audit web UI."""

from __future__ import annotations

from django.urls import path

from . import views, views_launch
from .permissions import APP_LABEL

app_name = APP_LABEL

urlpatterns = [
    path("runs/", views.run_list, name="run_list"),
    path("runs/<int:pk>/", views.run_detail, name="run_detail"),
    path(
        "runs/<int:pk>/findings.csv",
        views.findings_csv,
        name="findings_csv",
    ),
    path(
        "runs/<int:pk>/state.json",
        views_launch.run_state_json,
        name="run_state_json",
    ),
    path(
        "runs/state.json",
        views_launch.runs_state_json,
        name="runs_state_json",
    ),
    path(
        "run-launch/",
        views_launch.run_launch_submit,
        name="run_launch",
    ),
    path(
        "findings/<int:pk>/explain/",
        views.finding_explain,
        name="finding_explain",
    ),
    path("invocations/", views.invocation_list, name="invocation_list"),
    path("changelog/", views.changelog_list, name="changelog_list"),
]
