from django.urls import include, path
from rest_framework.routers import DefaultRouter

from .views import (
    AIUpdateView,
    AgentSummaryView,
    BenchmarkPriceViewSet,
    CashFlowViewSet,
    PerformanceView,
    PortfolioSnapshotViewSet,
    PortfolioViewSet,
    RiskView,
    StockViewSet,
    TransactionViewSet,
)

router = DefaultRouter()
router.register(r'portfolios', PortfolioViewSet, basename='invest-portfolio')
router.register(r'stocks', StockViewSet, basename='invest-stock')
router.register(r'transactions', TransactionViewSet, basename='invest-transaction')
router.register(r'cashflows', CashFlowViewSet, basename='invest-cashflow')
router.register(r'snapshots', PortfolioSnapshotViewSet, basename='invest-snapshot')
router.register(r'benchmarks', BenchmarkPriceViewSet, basename='invest-benchmark')

urlpatterns = [
    path('', include(router.urls)),
    path('ai-update/', AIUpdateView.as_view(), name='invest-ai-update'),
    path('agent/summary/', AgentSummaryView.as_view(), name='invest-agent-summary'),
    path('performance/', PerformanceView.as_view(), name='invest-performance'),
    path('risk/', RiskView.as_view(), name='invest-risk'),
]
