from pathlib import Path

from gramlot_examples import build_gallery
from gramlot_py_server.uvicorn import create_application

# The standard input/layout collection bundles used by the gallery.
# They are installed dependencies, not hidden application behavior.
gallery = build_gallery()
collections = gallery["collections"]
assets = {entry["module"]: gallery["assets"][entry["module"]]
          for entry in collections}

application = create_application(
    Path(__file__).parent / "pages",
    collections=collections,
    assets=assets,
)
