from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import CustomUserViewSet, Stage1SignupView, GoogleLogin, AppleLogin, DeleteAccountView
from rest_framework_simplejwt.views import TokenRefreshView

router = DefaultRouter()
router.register(r'profiles', CustomUserViewSet, basename='user-profile')

urlpatterns = [
    # Dashboard and Profile
    path('', include(router.urls)),

    # Signup
    path('signup/', Stage1SignupView.as_view(), name='user-signup'),

    # Base Authentication (Login, Logout, Password Reset)
    path('auth/', include('dj_rest_auth.urls')),

    # Social Authentication
    path('auth/google/', GoogleLogin.as_view(), name='google_login'),
    path('auth/apple/', AppleLogin.as_view(), name='apple_login'),

    # Tokens and Data Management
    path('auth/refresh-token/', TokenRefreshView.as_view(), name='token_refresh'),
    path('auth/delete-account/', DeleteAccountView.as_view(), name='delete-account'),
]
