from _typeshed import Incomplete
from collections.abc import Iterable
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
from homeassistant.loader import Integration as Integration, async_get_config_flows as async_get_config_flows, async_get_integrations as async_get_integrations, bind_hass as bind_hass
from homeassistant.util.json import load_json as load_json
from typing import Any

_LOGGER: Incomplete
TRANSLATION_FLATTEN_CACHE: str
LOCALE_EN: str

def recursive_flatten(prefix: Any, data: dict[str, Any]) -> dict[str, Any]: ...
def component_translation_path(component: str, language: str, integration: Integration) -> str | None: ...
def load_translations_files(translation_files: dict[str, str]) -> dict[str, dict[str, Any]]: ...
def _merge_resources(translation_strings: dict[str, dict[str, Any]], components: set[str], category: str) -> dict[str, dict[str, Any]]: ...
def build_resources(translation_strings: dict[str, dict[str, Any]], components: set[str], category: str) -> dict[str, dict[str, Any] | str]: ...
async def _async_get_component_strings(hass: HomeAssistant, language: str, components: set[str], integrations: dict[str, Integration]) -> dict[str, Any]: ...

class _TranslationCache:
    __slots__: Incomplete
    hass: Incomplete
    loaded: Incomplete
    cache: Incomplete
    lock: Incomplete
    def __init__(self, hass: HomeAssistant) -> None: ...
    async def async_fetch(self, language: str, category: str, components: set[str]) -> dict[str, str]: ...
    async def _async_load(self, language: str, components: set[str]) -> None: ...
    def _validate_placeholders(self, language: str, updated_resources: dict[str, Any], cached_resources: dict[str, Any] | None = None) -> dict[str, Any]: ...
    def _build_category_cache(self, language: str, components: set[str], translation_strings: dict[str, dict[str, Any]]) -> None: ...

async def async_get_translations(hass: HomeAssistant, language: str, category: str, integrations: Iterable[str] | None = None, config_flow: bool | None = None) -> dict[str, str]: ...
