"""{{ feature_name | capitalize }} API routes.

This module defines the FastAPI routes for the {{ feature_name }} feature.

Routes should:
    - Handle HTTP concerns (request/response)
    - Validate input using schemas
    - Delegate business logic to services
    - Return featureropriate response schemas
"""

from typing import Annotated

from fastapi import APIRouter, Depends
from sqlalchemy.ext.asyncio import AsyncSession

from db.database import get_db

# from {{ feature_name }} import services
# from {{ feature_name }}.schemas import {{ feature_name | capitalize }}Create, {{ feature_name | capitalize }}Public, {{ feature_name | capitalize }}Update
# from core.dependencies import PaginationParams, get_pagination
# from core.schemas import ListResponse, PaginationMeta, SuccessResponse

router = APIRouter()


# Example routes:
#
# @router.get("", response_model=ListResponse[{{ feature_name | capitalize }}Public])
# async def list_{{ feature_name }}s(
#     pagination: Annotated[PaginationParams, Depends(get_pagination)],
#     db: Annotated[AsyncSession, Depends(get_db)],
# ):
#     """List all {{ feature_name }}s with pagination."""
#     items, total = await services.list_{{ feature_name }}s(db, pagination)
#     return ListResponse(
#         items=items,
#         meta=PaginationMeta(
#             page=pagination.page,
#             page_size=pagination.page_size,
#             total_items=total,
#             total_pages=(total + pagination.page_size - 1) // pagination.page_size,
#         ),
#     )
#
#
# @router.get("/{{ '{' }}{{ feature_name }}_id{{ '}' }}", response_model={{ feature_name | capitalize }}Public)
# async def get_{{ feature_name }}(
#     {{ feature_name }}_id: int,
#     db: Annotated[AsyncSession, Depends(get_db)],
# ):
#     """Get a {{ feature_name }} by ID."""
#     return await services.get_{{ feature_name }}(db, {{ feature_name }}_id)
#
#
# @router.post("", response_model={{ feature_name | capitalize }}Public, status_code=201)
# async def create_{{ feature_name }}(
#     data: {{ feature_name | capitalize }}Create,
#     db: Annotated[AsyncSession, Depends(get_db)],
# ):
#     """Create a new {{ feature_name }}."""
#     return await services.create_{{ feature_name }}(db, data)
#
#
# @router.put("/{{ '{' }}{{ feature_name }}_id{{ '}' }}", response_model={{ feature_name | capitalize }}Public)
# async def update_{{ feature_name }}(
#     {{ feature_name }}_id: int,
#     data: {{ feature_name | capitalize }}Update,
#     db: Annotated[AsyncSession, Depends(get_db)],
# ):
#     """Update a {{ feature_name }}."""
#     return await services.update_{{ feature_name }}(db, {{ feature_name }}_id, data)
#
#
# @router.delete("/{{ '{' }}{{ feature_name }}_id{{ '}' }}", response_model=SuccessResponse)
# async def delete_{{ feature_name }}(
#     {{ feature_name }}_id: int,
#     db: Annotated[AsyncSession, Depends(get_db)],
# ):
#     """Delete a {{ feature_name }}."""
#     await services.delete_{{ feature_name }}(db, {{ feature_name }}_id)
#     return SuccessResponse(message="{{ feature_name | capitalize }} deleted successfully")
