from django.urls import path
from . import views

urlpatterns = [
    path('', views.index, name='index'),
    path('admin-login/', views.admin_login, name='admin_login'),
    path('generate-code/', views.generate_code, name='generate_code'),
    path('recover-code/', views.recover_code, name='recover_code'),
    path('logout/', views.logout, name='logout'),
    
    # Admin
    path('admin-dashboard/', views.admin_dashboard, name='admin_dashboard'),
    path('admin/create-game/', views.admin_create_game, name='admin_create_game'),
    path('admin/edit-game/<int:pk>/', views.admin_edit_game, name='admin_edit_game'),
    path('admin/delete-game/<int:pk>/', views.admin_delete_game, name='admin_delete_game'),
    path('admin/edit-rental/<int:pk>/', views.admin_edit_rental, name='admin_edit_rental'),
    
    # User
    path('catalog/', views.catalog, name='catalog'),
    path('purchase/<int:pk>/', views.purchase_game, name='purchase_game'),
    path('generate-purchase/<int:game_pk>/<int:option_pk>/', views.generate_purchase, name='generate_purchase'),
    path('simulate-payment/<int:purchase_id>/', views.simulate_payment, name='simulate_payment'),
    path('verify-payment-status/<int:purchase_id>/', views.verify_payment_status, name='verify_payment_status'),
    path('play/<int:pk>/', views.play_game, name='play_game'),
]
