"""
Author: Michel Peltriaux
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
Contact: michel.peltriaux@sgdnord.rlp.de
Created on: 24.08.21

"""
from django.urls import path

from compensation.views.compensation.detail import DetailCompensationView
from compensation.views.compensation.document import EditCompensationDocumentView, NewCompensationDocumentView, \
    GetCompensationDocumentView, RemoveCompensationDocumentView
from compensation.views.compensation.remove import RemoveCompensationView
from compensation.views.compensation.resubmission import CompensationResubmissionView
from compensation.views.compensation.report import CompensationPublicReportView
from compensation.views.compensation.deadline import NewCompensationDeadlineView, EditCompensationDeadlineView, \
    RemoveCompensationDeadlineView
from compensation.views.compensation.action import NewCompensationActionView, EditCompensationActionView, \
    RemoveCompensationActionView
from compensation.views.compensation.state import NewCompensationStateView, EditCompensationStateView, \
    RemoveCompensationStateView
from compensation.views.compensation.compensation import IndexCompensationView, CompensationIdentifierGeneratorView, \
    EditCompensationView, NewCompensationView
from compensation.views.compensation.log import CompensationLogView

urlpatterns = [
    # Main compensation
    path("", IndexCompensationView.as_view(), name="index"),
    path('new/id', CompensationIdentifierGeneratorView.as_view(), name='new-id'),
    path('new/<intervention_id>', NewCompensationView.as_view(), name='new'),
    path('new', NewCompensationView.as_view(), name='new'),
    path('<id>', DetailCompensationView.as_view(), name='detail'),
    path('<id>/log', CompensationLogView.as_view(), name='log'),
    path('<id>/edit', EditCompensationView.as_view(), name='edit'),
    path('<id>/remove', RemoveCompensationView.as_view(), name='remove'),

    path('<id>/state/new', NewCompensationStateView.as_view(), name='new-state'),
    path('<id>/state/<state_id>/edit', EditCompensationStateView.as_view(), name='state-edit'),
    path('<id>/state/<state_id>/remove', RemoveCompensationStateView.as_view(), name='state-remove'),

    path('<id>/action/new', NewCompensationActionView.as_view(), name='new-action'),
    path('<id>/action/<action_id>/edit', EditCompensationActionView.as_view(), name='action-edit'),
    path('<id>/action/<action_id>/remove', RemoveCompensationActionView.as_view(), name='action-remove'),

    path('<id>/deadline/new', NewCompensationDeadlineView.as_view(), name="new-deadline"),
    path('<id>/deadline/<deadline_id>/edit', EditCompensationDeadlineView.as_view(), name='deadline-edit'),
    path('<id>/deadline/<deadline_id>/remove', RemoveCompensationDeadlineView.as_view(), name='deadline-remove'),
    path('<id>/report', CompensationPublicReportView.as_view(), name='report'),
    path('<id>/resub', CompensationResubmissionView.as_view(), name='resubmission-create'),

    # Documents
    path('<id>/document/new/', NewCompensationDocumentView.as_view(), name='new-doc'),
    path('<id>/document/<doc_id>', GetCompensationDocumentView.as_view(), name='get-doc'),
    path('<id>/document/<doc_id>/remove/', RemoveCompensationDocumentView.as_view(), name='remove-doc'),
    path('<id>/document/<doc_id>/edit/', EditCompensationDocumentView.as_view(), name='edit-doc'),

]