"""PyScript entrypoint: mount the app, then restore a signed-in tab or show sign-in."""
from pyscript import document, window

from framework import mount

from mail import store
from mail.views import App


async def main() -> None:
    mount("#app", App)
    try:
        document.getElementById("splash").remove()   # JsNull when absent: just skip
    except Exception:
        pass
    await store.boot()
    window.__w76MailReady = True


await main()  # noqa: F704 - PyScript runs this module with top-level await
