from typing import Dict
from typing import Any


def _make_pod_envconfig(relation_state: Dict[str, Any]) -> Dict[str, Any]:
    """Generate pod environment configuration.

    Args:
        relation_state(Dict[str, Any]): relation details.

    Returns:
        Dict[str, Any]: pod environment configuration.
    """
    mysql_db = relation_state["db"]
    endpoints = f"{mysql_db}-endpoints"
    return {
        # General configuration
        "MYSQL_HOST": endpoints,
        "MYSQL_USER": relation_state["user"],
        "MYSQL_ROOT_PASSWORD": relation_state["pwd"],
    }