{% extends 'base.html' %}
{% from 'macros.html' import render_selectable_table, render_pagination %}

{% block title %}{{ title }}{% endblock %}

{% block content_title %}{{ title }}{% endblock %}
{% block content_description %}View {{ component_type }}s for Tenant{% endblock %}
{% block content_class %}<div class="col-xl-12 col-lg-5 col-md-7 mx-auto"></div>{% endblock %}

{% block content %}
<div class="container">
    <form method="POST">
        {{ render_selectable_table(headers=["ID", "Name", "Type"], rows=rows, selectable=True, id=table_id) }}
        <div class="form-group mt-3">
            <button type="submit" name="action" value="edit_{{component_type|lower}}" class="btn btn-primary">Edit {{ component_type }}</button>
        </div>
    </form>
</div>
{% endblock %}

{% block content_footer %}
    {{ render_pagination(pagination, pagination_endpoint) }}
{% endblock %}