from abc import ABCMeta
from collections.abc import Mapping
from collections.abc import KeysView
from collections.abc import ItemsView
from collections.abc import ValuesView
from collections.abc import MutableMapping

from typing import TypeVar

from .._objects import ObjectID
from .files import File
from .attrs import AttributeManager

_K = TypeVar("_K", bound=str)
_V = TypeVar("_V")

class KeysViewHDF5(KeysView[_K]): ...
class ValuesViewHDF5(ValuesView[_V]): ...
class ItemsViewHDF5(ItemsView[_K, _V]): ...
class CommonStateObject: ...

class HLObject(CommonStateObject):
    @property
    def id(self) -> ObjectID: ...
    @property
    def name(self) -> str: ...
    @property
    def file(self) -> File: ...
    @property
    def attrs(self) -> AttributeManager: ...

class MappingHDF5(Mapping[_K, _V], metaclass=ABCMeta):
    def keys(self) -> KeysViewHDF5[_K]: ...
    def values(self) -> ValuesViewHDF5[_V]: ...
    def items(self) -> ItemsViewHDF5[_K, _V]: ...
    def _ipython_key_completions_(self) -> KeysViewHDF5[_K]: ...

class MutableMappingHDF5(
    MappingHDF5[_K, _V], MutableMapping[_K, _V], metaclass=ABCMeta
): ...
class Empty: ...
