# app/api/v1/shop/__init__.py
"""
Shop API router aggregation.

This module aggregates all shop-related JSON API endpoints (public facing).
Uses vendor context from middleware - no vendor_id in URLs.

Endpoints:
- Products: Browse catalog, search products
- Cart: Shopping cart operations (session-based)
- Orders: Order placement and history (requires auth)
- Auth: Customer login, registration, password reset
- Content Pages: CMS pages (about, faq, etc.)

Authentication:
- Products, Cart, Content Pages: No auth required
- Orders: Requires customer authentication (get_current_customer_api)
- Auth: Public (login, register)
"""

from fastapi import APIRouter

# Import shop routers
from . import auth, cart, content_pages, orders, products

# Create shop router
router = APIRouter()

# ============================================================================
# SHOP API ROUTES (All vendor-context aware via middleware)
# ============================================================================

# Authentication (public)
router.include_router(auth.router, tags=["shop-auth"])

# Products (public)
router.include_router(products.router, tags=["shop-products"])

# Shopping cart (public - session based)
router.include_router(cart.router, tags=["shop-cart"])

# Orders (authenticated)
router.include_router(orders.router, tags=["shop-orders"])

# Content pages (public)
router.include_router(
    content_pages.router, prefix="/content-pages", tags=["shop-content-pages"]
)

__all__ = ["router"]
