from fastapi import APIRouter
from app.utils.logger import logger
import time


router = APIRouter()

@router.get("/")
async def root():
    """Root endpoint."""
    start_time = time.time()
    logger.info("Root endpoint accessed")
    response = {"message": "Welcome to Salary Analytics API"}
    logger.info(f"Root endpoint completed in {time.time() - start_time:.2f} seconds")
    return response


@router.get("/health")
async def health_check():
    """Health check endpoint."""
    start_time = time.time()
    logger.info("Health check endpoint accessed")
    response = {"status": "healthy"}
    logger.info(f"Health check completed in {time.time() - start_time:.2f} seconds")
    return response



