<x-app-layout>
@section('title', $page . ' | ' . get_setting('site_name'))
  <div class="mt-4 grid grid-cols-12 gap-4 sm:mt-5 sm:gap-5 lg:mt-6 lg:gap-6">
    <div class="col-span-12 lg:col-span-8">
        <div class="alert flex rounded-lg border border-primary px-4 py-4 text-primary dark:border-accent dark:text-accent-light sm:px-5">
          Ads that have been viewed will reappear after 24 hours.
        </div>
        @if (!empty(get_setting('ptc_top_ad')))
          <div align="center" class="py-3">
              {!! get_setting('ptc_top_ad') !!}
          </div>
        @endif
        <div id="ptc-result" class="mt-2">
    
        </div>
        @if (!empty(get_setting('ptc_bottom_ad')))
          <div align="center" class="py-3">
              {!! get_setting('ptc_bottom_ad') !!}
          </div>
        @endif
    </div>
    <div class="col-span-12 gap-4 sm:gap-5 lg:col-span-4 lg:gap-6">
        <div class="overflow-x-auto">
          <table class="is-hoverable w-full text-left">
            <thead>
              <tr>
                <th class="whitespace-nowrap rounded-tl-lg bg-slate-200 px-4 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-5"> Name </th>
                <th class="whitespace-nowrap bg-slate-200 px-4 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-5"> IP </th>
                <th class="whitespace-nowrap bg-slate-200 px-4 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-5"> Balance </th>
                <th class="whitespace-nowrap bg-slate-200 px-4 py-3 font-semibold uppercase text-slate-800 dark:bg-navy-800 dark:text-navy-100 lg:px-5">Date</th>
              </tr>
            </thead>
            <tbody id="ptc-history">
              <tr>
                <td colspan="5" class="text-center py-4"><div class="w-full px-6 py-4"><div class="skeleton animate-wave h-3 w-full rounded bg-slate-150 dark:bg-navy-500"></div><div class="skeleton animate-wave mt-4 h-3 w-8/12 rounded bg-slate-150 dark:bg-navy-500"></div></div></td>
              </tr>
            </tbody>
          </table>
        </div>
        
        <!-- Pagination -->
        <div id="pagination" class="mt-4 flex justify-center"></div>
    </div>
  </div>
@push('scripts')
<script src="/dist/js/ptc.js?v={{ config('app.version') }}"></script>
@endpush
</x-app-layout>
