from typing import List, Optional
from uuid import UUID

from fastapi import APIRouter, HTTPException, Query, status

from src.auth.service import CurrentUser
from src.database.core import DbSession
from src.database.service import CommonParameters
from src.models import StandardResponse

from .service import get_model_data

router = APIRouter()


@router.get("", response_model=StandardResponse[dict])
async def get_dashboard_model_data(
    db_session: DbSession,
    simulation_id: Optional[UUID] = Query(None),
):
    result = await get_model_data(db_session=db_session, simulation_id=simulation_id)

    return StandardResponse(
        data=result,
        message="Data retrieved successfully",
    )
