<script type="text/javascript">


    jQuery(document).ready(function ($) {
        jQuery('.antivirus_history__pagination').on('click', 'a.wtotem_pagination__number', function (e) {
            e.preventDefault();
            jQuery('#av_history_wrap').addClass('wtotem_loader_spinner');
            jQuery.post(ajaxurl, {
                action: 'wtotem_ajax',
                ajax_action: 'pagination',
                wtotem_page_nonce: '{{ page_nonce }}',
                service: 'antivirus',
                current_page: jQuery(this).attr('data-page'),
            }, function (data) {
                jQuery('#av_history_wrap').removeClass('wtotem_loader_spinner').html(data.content);
                jQuery('.antivirus_history__pagination').html(data.pagination);
                jQuery('#wtotem_notifications').html(data.notifications);
            });
        });
    });

</script>


<div class="antivirus-history">
    <h3 class="antivirus-history__title">{{ 'History'|trans }}</h3>


</div>

<div class="antivirus-scanned--advanced">
    <div class="antivirus-scanned antivirus-scanned--advanced">
        <table>
            <thead>
            <tr>
                <td>{{ 'Scan'|trans }}</td>
                <td>{{ 'Start time'|trans }}</td>
                <td>{{ 'End time'|trans }}</td>
                <td>{{ 'Duration'|trans }}</td>
                <td><div class="wt-flex wt-flex-middle wt-flex-between"><span>{{ 'Scanned'|trans }}</span></div></td>
                <td><div class="wt-flex wt-flex-middle wt-flex-between"><span>{{ 'Infected'|trans }}</span></div></td>
            </tr>
            </thead>
            <tbody id="av_history_wrap">
                {% include 'antivirus_history_items.html.twig' with {'logs': logs} %}
            </tbody>
        </table>
        <div class="antivirus_history__pagination">{{ antivirus_history_pagination | raw }}</div>
    </div>
</div>