from django.urls import path

from . import views
from .views import api_lista_vehiculos, api_detalle_vehiculo
from .views import api_lista_repostajes, api_detalle_repostaje

app_name = 'repostajes'

urlpatterns = [
    path('', views.principal, name='principal'),
    path('vehiculos/', views.lista_vehiculos, name='lista_vehiculos'),
    path('vehiculos/nuevo/', views.nuevo_vehiculo, name='nuevo_vehiculo'),
    path('vehiculos/<int:vehiculo_id>/', views.detalle_vehiculo, name='detalle_vehiculo'),
    path('vehiculos/<int:vehiculo_id>/editar/', views.editar_vehiculo, name='editar_vehiculo'),
    path('vehiculos/<int:vehiculo_id>/eliminar/', views.eliminar_vehiculo, name='eliminar_vehiculo'),

    path('repostajes/', views.lista_repostajes, name='lista_repostajes'),
    path('repostajes/nuevo/', views.nuevo_repostaje, name='nuevo_repostaje'),
    path('repostajes/<int:repostaje_id>/', views.detalle_repostaje, name='detalle_repostaje'),
    path('repostajes/<int:repostaje_id>/editar/', views.editar_repostaje, name='editar_repostaje'),
    path('repostajes/<int:repostaje_id>/eliminar/', views.eliminar_repostaje, name='eliminar_repostaje'),
    path('api/vehiculos/', api_lista_vehiculos, name='api_lista_vehiculos'),
    path('api/vehiculos/<int:vehiculo_id>/', api_detalle_vehiculo, name='api_detalle_vehiculo'),
    path('api/repostajes/', api_lista_repostajes, name='api_lista_repostajes'),
    path('api/repostajes/<int:repostaje_id>/', api_detalle_repostaje, name='api_detalle_repostaje'),
]
