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

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

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


@app.on_message
async def reply(msg: dyui.Message, chat: dyui.Chat):
    yield "Here is the `quick_replies` component."
    yield ui.QuickReplies("Show hotels", "Book the cheaper one")
    # tapping an option sends its text as a new message, which runs reply() again
