from fastapi import APIRouter, Depends, status

from app.deps import verify_internal_token
from app.schemas.prep_plans import PrepPlanRequest, PrepPlanResponse
from app.services.prep_plans import PrepPlansService

router = APIRouter(prefix="/prep-plans")
_service = PrepPlansService()


@router.post(
    "/generate",
    response_model=PrepPlanResponse,
    status_code=status.HTTP_200_OK,
    summary="Personalized Interview Prep Plan",
    dependencies=[Depends(verify_internal_token)],
)
async def generate_prep_plan(payload: PrepPlanRequest) -> PrepPlanResponse:
    return await _service.generate(payload)
