"""Handler implementations for TrustMem."""

from trustmem.handler.protocol import HandlerProtocol

__all__ = [
    "HandlerProtocol",
    "PersistentHandler",
    "create_handler",
]


def __getattr__(name: str):
    if name == "PersistentHandler":
        from trustmem.handler.persistent import PersistentHandler
        return PersistentHandler
    if name == "create_handler":
        from trustmem.handler.factory import create_handler
        return create_handler
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
