from typing import Dict
from typing import Any
from typing import Set


def build_resources(
    translation_strings: Dict[str, Dict[str, Any]],
    components: Set[str],
    category: str,
) -> Dict[str, Dict[str, Any]]:
    """Build the resources response for the given components."""
    # Build response
    resources: Dict[str, Dict[str, Any]] = {}
    for component in components:
        new_value = translation_strings[component].get(category)

        if new_value is None:
            continue

        resources[component] = {category: new_value}

    return {"component": resources}