"""Storage backends for PugBrain."""

from neural_memory.storage.base import NeuralStorage
from neural_memory.storage.factory import HybridStorage, create_storage
from neural_memory.storage.memory_store import InMemoryStorage
from neural_memory.storage.shared_store import SharedStorage
from neural_memory.storage.shared_store_collections import SharedStorageError
from neural_memory.storage.sqlite_store import SQLiteStorage

__all__ = [
    "HybridStorage",
    "InMemoryStorage",
    "NeuralStorage",
    "SQLiteStorage",
    "SharedStorage",
    "SharedStorageError",
    "create_storage",
]


# Lazy import FalkorDB to avoid requiring falkordb package for SQLite users
def __getattr__(name: str):  # type: ignore[no-untyped-def]
    if name == "FalkorDBStorage":
        from neural_memory.storage.falkordb.falkordb_store import FalkorDBStorage

        return FalkorDBStorage
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
