# app/modules/hosting/__init__.py
"""
Hosting Module - Web hosting, domains, email, and website building.

This is a self-contained module providing:
- POC website lifecycle management (draft → live pipeline)
- Client service tracking (domains, email, SSL, hosting, maintenance)
- Integration with prospecting module for prospect → merchant conversion
- Dashboard with KPIs, status charts, and renewal alerts

Module Structure:
- models/ - Database models (hosted_site, client_service)
- services/ - Business logic (lifecycle, service management, stats)
- schemas/ - Pydantic DTOs
- routes/ - API and page routes (admin + public POC viewer)
- tasks/ - Celery background tasks for expiry checks
- exceptions.py - Module-specific exceptions
"""


def __getattr__(name: str):
    """Lazy import module components to avoid circular imports."""
    if name == "hosting_module":
        from app.modules.hosting.definition import hosting_module

        return hosting_module
    if name == "get_hosting_module_with_routers":
        from app.modules.hosting.definition import (
            get_hosting_module_with_routers,
        )

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


__all__ = ["hosting_module", "get_hosting_module_with_routers"]
