from .const import DOMAIN as DOMAIN
from .entry_data import RuntimeEntryData as RuntimeEntryData
from bleak.backends.service import BleakGATTServiceCollection as BleakGATTServiceCollection
from collections.abc import MutableMapping
from homeassistant.config_entries import ConfigEntry as ConfigEntry
from homeassistant.core import HomeAssistant as HomeAssistant
from homeassistant.helpers.json import JSONEncoder as JSONEncoder
from homeassistant.helpers.storage import Store as Store
from typing import TypeVar

STORAGE_VERSION: int
MAX_CACHED_SERVICES: int
_DomainDataSelfT = TypeVar('_DomainDataSelfT', bound='DomainData')

class DomainData:
    _entry_datas: dict[str, RuntimeEntryData]
    _stores: dict[str, Store]
    _gatt_services_cache: MutableMapping[int, BleakGATTServiceCollection]
    _gatt_mtu_cache: MutableMapping[int, int]
    def get_gatt_services_cache(self, address: int) -> Union[BleakGATTServiceCollection, None]: ...
    def set_gatt_services_cache(self, address: int, services: BleakGATTServiceCollection) -> None: ...
    def clear_gatt_services_cache(self, address: int) -> None: ...
    def get_gatt_mtu_cache(self, address: int) -> Union[int, None]: ...
    def set_gatt_mtu_cache(self, address: int, mtu: int) -> None: ...
    def clear_gatt_mtu_cache(self, address: int) -> None: ...
    def get_entry_data(self, entry: ConfigEntry) -> RuntimeEntryData: ...
    def set_entry_data(self, entry: ConfigEntry, entry_data: RuntimeEntryData) -> None: ...
    def pop_entry_data(self, entry: ConfigEntry) -> RuntimeEntryData: ...
    def is_entry_loaded(self, entry: ConfigEntry) -> bool: ...
    def get_or_create_store(self, hass: HomeAssistant, entry: ConfigEntry) -> Store: ...
    @classmethod
    def get(cls, hass: HomeAssistant) -> _DomainDataSelfT: ...
    def __init__(self, _entry_datas, _stores, _gatt_services_cache, _gatt_mtu_cache) -> None: ...
