{# Table Component - Reusable table macro for consistent data display #} {% macro table(headers=[], class="", striped=True, hover=True) %}
{% for header in headers %} {% endfor %} {{ caller() }}
{{ header }}
{% endmacro %} {# Table Row - Use inside table macro #} {% macro table_row(cells=[], hover=True, class="") %} {% for cell in cells %} {{ cell | safe }} {% endfor %} {% endmacro %} {# Data Table - Macro-based table with sorting and search capability #} {% macro data_table(title=None, id="data-table", search=True, export=False, class="") %}
{% if title or search or export %}
{% if title %}

{{ title }}

{% endif %}
{% if search %}
{% endif %} {% if export %} {% endif %}
{% endif %}
{{ caller() }}
{% endmacro %} {# Simple Responsive Table #} {% macro responsive_table(title=None, class="") %}
{% if title %}

{{ title }}

{% endif %}
{{ caller() }}
{% endmacro %} {# Table Cell with Badge #} {% macro badge_cell(text, variant="default", class="") %} {{ text }} {% endmacro %} {# Status Indicator with Text #} {% macro status_cell(text, status="active", class="") %}
{{ text }}
{% endmacro %} {# Action Buttons Cell #} {% macro action_buttons(edit_url="#", delete_url="#", view_url="#", class="") %}
{% if view_url and view_url != "#" %} View {% endif %} {% if edit_url and edit_url != "#" %} Edit {% endif %} {% if delete_url and delete_url != "#" %} {% endif %}
{% endmacro %} {# Expandable Row - For detailed information #} {% macro expandable_row(summary, id=None) %}
{{ summary | safe }}
{{ caller() }}
{% endmacro %} {# Empty Table State #} {% macro empty_table(message="No data available") %}

{{ message }}

{% endmacro %}