{% macro page_header(icon_class, title_text, subtitle_text=None, actions_html=None) %}
{% if icon_class %}
{% endif %}

{{ _(title_text) }}

{% if subtitle_text %}

{{ _(subtitle_text) }}

{% endif %}
{{ actions_html|safe if actions_html }}
{% endmacro %} {% macro summary_card(icon_class, icon_color, label, value, trend=None) %}

{{ value }}

{{ _(label) }}

{% if trend %}
{{ trend }}%
{% endif %}
{% endmacro %} {% macro empty_state(icon_class, title, message, actions_html=None, type="default") %}

{{ _(title) }}

{{ _(message) }}

{% if actions_html %}
{{ actions_html|safe }}
{% endif %}
{% endmacro %} {% macro empty_state_with_features(icon_class, title, message, features, actions_html=None, type="default") %}

{{ _(title) }}

{{ _(message) }}

{% if features %}
{% for feature in features %}
{{ _(feature.title) }}
{{ _(feature.description) }}
{% endfor %}
{% endif %} {% if actions_html %}
{{ actions_html|safe }}
{% endif %}
{% endmacro %} {% macro skeleton_card() %}
{% endmacro %} {% macro skeleton_table(rows=5, cols=4) %}
{% for i in range(rows) %}
{% for j in range(cols) %}
{% endfor %}
{% endfor %}
{% endmacro %} {% macro skeleton_list(items=5) %}
{% for i in range(items) %}
{% endfor %}
{% endmacro %} {% macro loading_spinner(size="md", text=None) %}
{% if text %}
{{ _(text) }}
{% endif %}
{% endmacro %} {% macro loading_overlay(text="Loading...") %}
{{ _(text) }}
{% endmacro %} {% macro modern_button(text, url, icon_class=None, variant="primary", size="md", attributes="") %} {% if icon_class %}{% endif %} {{ _(text) }} {% endmacro %} {% macro status_badge(status, text=None) %} {% set status_map = { 'active': {'color': 'success', 'icon': 'fas fa-check-circle', 'bg': 'rgba(16, 185, 129, 0.1)'}, 'inactive': {'color': 'secondary', 'icon': 'fas fa-pause-circle', 'bg': 'rgba(100, 116, 139, 0.1)'}, 'pending': {'color': 'warning', 'icon': 'fas fa-clock', 'bg': 'rgba(245, 158, 11, 0.1)'}, 'completed': {'color': 'success', 'icon': 'fas fa-check-circle', 'bg': 'rgba(16, 185, 129, 0.1)'}, 'cancelled': {'color': 'danger', 'icon': 'fas fa-times-circle', 'bg': 'rgba(239, 68, 68, 0.1)'}, 'draft': {'color': 'secondary', 'icon': 'fas fa-edit', 'bg': 'rgba(100, 116, 139, 0.1)'}, 'published': {'color': 'primary', 'icon': 'fas fa-globe', 'bg': 'rgba(59, 130, 246, 0.1)'} } %} {% set config = status_map.get(status, {'color': 'secondary', 'icon': 'fas fa-circle', 'bg': 'rgba(100, 116, 139, 0.1)'}) %} {{ _(text or status.title()) }} {% endmacro %} {% macro info_card(title, content, icon_class=None, color="primary") %}
{% if icon_class %}
{% endif %}
{{ _(title) }}

{{ _(content) }}

{% endmacro %} {% macro progress_card(title, current, total, color="primary", show_percentage=True) %} {% set percentage = (current / total * 100) if total > 0 else 0 %}
{{ _(title) }}
{% if show_percentage %} {{ "%.0f%%"|format(percentage) }} {% endif %}
{{ current }} / {{ total }} {{ total - current }} {{ _('remaining') }}
{% endmacro %}