from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .api_views import StockOperationViewSet
from .views import scan_barcode_camera, process_barcode
from . import views

router = DefaultRouter()
router.register(r'stock-operations', StockOperationViewSet, basename='stock-operation')

urlpatterns = [
    path('api/', include(router.urls)),
    path('scan-barcode-camera/', scan_barcode_camera, name='scan-barcode-camera'),
    path('scan-barcode/', process_barcode, name='scan_barcode'),

    path('', views.dashboard, name='dashboard'),
    path('warehouses/', views.warehouses_list, name='warehouses'),
    path('operations/', views.operations_list, name='stock_operations'),
    path('warehouses/add/', views.add_warehouse, name='add_warehouse'),
]
