from app.config import logger
from app.models import AnalysisRequest, AnalysisResponse
from fastapi import APIRouter

analysis_router = APIRouter(prefix="/analysis", tags=["Analysis"])


@analysis_router.post("/", response_model=AnalysisResponse)
def analysis_data(request: AnalysisRequest):
    """
    Analyse imported data (e.g., sentiment, keywords, or patterns).
    """
    logger.info(
        f"Analyse imported data "
        f"on {request.analysis_type} "
        f"with filters {request.filters}"
    )
    # Placeholder for analysis logic
    analysis = ...
    return {"analysis": analysis}
