<script>
$(function () {
  'use strict';
  var table = $('#data-opens').DataTable({
    "order": [[8, "DESC"]],
    "lengthMenu": [[100, 500], [100, 500]],
    "ajax": {
      "url" : "{{ route('campaign.opens') }}",
      "data" : {
        "stat_id" : "{{ $stat_id }}"
      }
    }
    
  });
  table.on('draw', function() {
    $('#data-opens_filter label').addClass('me-2 mb-1');
    $('#data-opens_paginate a').addClass('btn btn-primary me-1');
    $('#data-opens_paginate .paginate_button.current').addClass('btn-light').removeClass('btn-primary');
  });
});
</script>

<div class="table-responsive">
<table id="data-opens" class="table table-bordered text-nowrap w-100">
  <thead>
  <tr>
    <th>{{ __('app.email') }}</th>
    <th>{{ __('app.list') }}</th>
    <th>{{ __('app.delivery_server') }}</th>
    <th>{{ __('app.message_id') }}</th>
    <th>{{ __('app.ip') }}</th>
    <th>{{ __('app.country') }}</th>
    <th>{{ __('app.city') }}</th>
    <th>{{ __('app.zip_code') }}</th>
    <th>{{ __('app.datetime') }}</th>
  </tr>
  </thead>
  <tbody>
  </tbody>
</table>
</div>

