{# ── Reusable component macros ──────────────────────────────────── #} {# Flash callout #} {% macro flash(status, message) %} {% if message %}
{{ message }}
{% endif %} {% endmacro %} {# Sidebar HUD key-value row #} {% macro hud_item(label, value, color='') %}
{{ label }} {{ value }}
{% endmacro %} {# Stat card for stat-grid (legacy, kept for compatibility if needed) #} {% macro stat_card(label, value) %}
{{ label }}
{{ value }}
{% endmacro %} {# Bot card #} {% macro bot_card(alias, running, model='', channels=none) %} {% set status_text = 'Active' if running else 'Stopped' %} {% set status_color = 'var(--status-running)' if running else 'var(--text-muted)' %}
{{ alias }} {{ status_text }}
{% if model %}
Model {{ model }}
{% endif %} {% if channels %}
Channels {{ channels | join(', ') }}
{% endif %}
{% if running %} {% else %} {% endif %}
{% endmacro %} {# Select options helper #} {% macro select_options(options, selected) %} {% if selected and selected not in options %}{% endif %} {% for opt in options %}{% endfor %} {% endmacro %}