from importlib import import_module
from typing import Any

__all__ = ["SpotifyClient", "VoiceEngine", "ParsedCommand", "parse_voice_command"]


def __getattr__(name: str) -> Any:
    if name == "SpotifyClient":
        return import_module(".spotify_client", __name__).SpotifyClient
    if name == "VoiceEngine":
        return import_module(".voice_engine", __name__).VoiceEngine
    if name in ("ParsedCommand", "parse_voice_command"):
        utils_module = import_module(".utils", __name__)
        return getattr(utils_module, name)
    raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
