"""A complete DyUI app that shows the `stats` component.

Save it as app.py, then run:  dyui run app.py
"""
import dyui
from dyui import ui

app = dyui.App(title="Stats demo", starters=["Show me"], persist=False)


@app.on_message
async def reply(msg: dyui.Message, chat: dyui.Chat):
    yield "Here is the `stats` component."
    yield ui.Stats(ui.Stat("Orders", 1284), ui.Stat("AOV", "$37.50"))
