{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template aiprovider_datacurso/consumption_page

    TODO describe template consumption

    Example context (json):
    {
    }
}}

<!-- Filters Section -->
<div class="filters mb-4">
    <div class="card">
        <div class="card-body">
            <div class="row align-items-end">
                <div class="col-lg-3 col-md-6 col-12 mb-3">
                    <label for="filter-service" class="form-label font-weight-bold">
                        {{#str}}service, aiprovider_datacurso{{/str}}:
                    </label>
                    <select id="filter-service" class="form-control">
                        <option value="">{{#str}}all, core{{/str}}</option>
                    </select>
                </div>

                <div class="col-lg-3 col-md-6 col-12 mb-3">
                    <label for="filter-action" class="form-label font-weight-bold">
                        {{#str}}action, aiprovider_datacurso{{/str}}:
                    </label>
                    <select id="filter-action" class="form-control">
                        <option value="">{{#str}}all, core{{/str}}</option>
                    </select>
                </div>

                <div class="col-lg-3 col-md-6 col-12 mb-3">
                    <label for="filter-date-from" class="form-label font-weight-bold">
                        {{#str}}fromdate, core{{/str}}:
                    </label>
                    <input type="date" id="filter-date-from" class="form-control">
                </div>

                <div class="col-lg-3 col-md-6 col-12 mb-3">
                    <label for="filter-date-to" class="form-label font-weight-bold">
                        {{#str}}todate, core{{/str}}:
                    </label>
                    <input type="date" id="filter-date-to" class="form-control">
                </div>

                
            </div>
        </div>
    </div>
</div>

<div data-region="aiprovider_datacurso/consumption-table">
    {{> aiprovider_datacurso/consumption_row}}
</div>

<!-- Pagination Section -->
<div class="pagination-section">
    <div class="card">
        <div class="card-body">
            <div class="row align-items-end">
                <!-- Nav buttons -->
                <div class="col-lg-auto col-md-4 col-12 mb-2 mb-lg-0">
                    <nav aria-label="Pagination Navigation">
                        <div class="btn-group" role="group">
                            <button id="prev-page" class="btn btn-outline-primary" disabled>
                                <i class="fa fa-chevron-left" aria-hidden="true"></i>
                                <span class="d-none d-sm-inline">{{#str}}previous, core{{/str}}</span>
                            </button>
                            <button id="next-page" class="btn btn-outline-primary" disabled>
                                <span class="d-none d-sm-inline">{{#str}}next, core{{/str}}</span>
                                <i class="fa fa-chevron-right" aria-hidden="true"></i>
                            </button>
                        </div>
                    </nav>
                </div>
                
                <!-- Filter: Number of rows -->
                <div class="col-lg-auto col-md-3 col-6 mb-2 mb-lg-0 pl-lg-2">
                    <label for="filter-limit" class="form-label font-weight-bold small mb-1 d-block">
                        {{#str}}showrows, aiprovider_datacurso{{/str}}:
                    </label>
                    <select id="filter-limit" class="form-control">
                        <option value="10" selected>10</option>
                        <option value="25">25</option>
                        <option value="50">50</option>
                        <option value="100">100</option>
                    </select>
                </div>

                <!-- Filer: Go to page -->
                <div class="col-lg-auto col-md-3 col-6 mb-2 mb-lg-0 pl-lg-2">
                    <label for="filter-page" class="form-label font-weight-bold small mb-1 d-block">
                        {{#str}}gotopage, aiprovider_datacurso{{/str}}:
                    </label>
                    <input type="number" id="filter-page" min="1" class="form-control">
                </div>

                <!-- Information page -->
                <div class="col-lg col-md-12 col-12 mb-2 mb-lg-0">
                    <div class="text-lg-right text-md-center text-center">
                        <span id="page-info" class="text-muted font-weight-bold"></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
