try:
    from ._version import __version__
except ImportError:
    # Fallback when using the package in dev mode without installing
    # in editable mode with pip. It is highly recommended to install
    # the package from a stable release or in editable mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs
    import warnings
    warnings.warn("Importing 'cslx' outside a proper installation.")
    __version__ = "dev"
from .handlers import setup_handlers


def _jupyter_server_extension_points():
    """
    Tell Jupyter Server how to discover this extension.
    """
    return [{"module": "cslx"}]  # module containing _load_jupyter_server_extension
    # (If you build an ExtensionApp later, you can add {"app": MyExtensionApp} instead.)

def _load_jupyter_server_extension(serverapp):
    """
    Called by Jupyter Server when the extension is enabled.
    """
    serverapp.log.info("Loading cslx server extension")
    setup_handlers(serverapp.web_app)
