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

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

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


@app.on_message
async def reply(msg: dyui.Message, chat: dyui.Chat):
    yield "Here is the `accordion` component."
    yield ui.Accordion(ui.AccordionItem("Can I change my flight?", ui.Markdown("Yes, free up to **24 hours** before departure.")), ui.AccordionItem("How do refunds work?", ui.Markdown("Refunds arrive in 3–5 business days.")))
