 <div class="tw-pt-5 tw-sm:pt-6">
    <div class="tw-custom-scrollbar tw-max-w-full tw-overflow-x-auto tw-overflow-y-visible">
        <table class="tw-min-w-full">
            {include file="{$tailadminURI}smarty/reloadable/components/tables/parts/columns/{$table->getTemplateName()}"
            columns=$table->getHeader()}
            <tbody class="tw-divide-y tw-divide-gray-100 tw-dark:divide-gray-800">
                {include file="{$tailadminURI}smarty/reloadable/components/tables/parts/rows/{$table->getTemplateName()}"
                rows=$table->getRows()}
            </tbody>
        </table>
    </div>
    {if $showPagination}
    <div class="tw-border-t tw-border-gray-200 tw-px-6 tw-py-4 tw-dark:border-gray-800">
        <div class="tw-flex tw-items-center tw-justify-between">
            <button hx-get="{stbIO uri='getErrorTable' page=$table->getPagination()->getPreviousPage()}"
                    hx-target="#errorTable"
                    hx-swap="innerHTML"
                    class="tw-text-theme-sm tw-shadow-theme-xs tw-flex tw-items-center tw-gap-2
                    tw-rounded-lg tw-border tw-border-gray-300 tw-bg-white tw-px-2 tw-py-2 tw-font-medium
                    tw-text-gray-700 tw-hover:bg-gray-50 tw-hover:text-gray-800 tw-sm:px-3.5
                    tw-dark:border-gray-700 tw-dark:bg-gray-800 tw-dark:text-gray-400
                    tw-dark:hover:bg-white/[0.03] tw-dark:hover:text-gray-200">
                <svg class="tw-fill-current"
                     width="20"
                     height="20"
                     viewBox="0 0 20 20"
                     fill="none"
                     xmlns="http://www.w3.org/2000/svg">
                    <path fill-rule="evenodd"
                          clip-rule="evenodd"
                          d="M2.58301 9.99868C2.58272 10.1909 2.65588 10.3833 2.80249 10.53L7.79915 15.5301C8.09194 15.8231 8.56682 15.8233 8.85981 15.5305C9.15281 15.2377 9.15297 14.7629 8.86018 14.4699L5.14009 10.7472L16.6675 10.7472C17.0817 10.7472 17.4175 10.4114 17.4175 9.99715C17.4175 9.58294 17.0817 9.24715 16.6675 9.24715L5.14554 9.24715L8.86017 5.53016C9.15297 5.23717 9.15282 4.7623 8.85983 4.4695C8.56684 4.1767 8.09197 4.17685 7.79917 4.46984L2.84167 9.43049C2.68321 9.568 2.58301 9.77087 2.58301 9.99715C2.58301 9.99766 2.58301 9.99817 2.58301 9.99868Z"
                          fill=""
                    />
                </svg>
                <span class="tw-hidden tw-sm:inline">{__('Previous')}</span>
            </button>
            <span class="tw-block tw-text-sm tw-font-medium tw-text-gray-700 tw-sm:hidden
            tw-dark:text-gray-400">
                Page 1 of 10
            </span>
            <ul class="tw-hidden tw-items-center tw-gap-0.5 tw-sm:flex">
                {foreach $table->getPagination()->getPages() as $page}
                    <li>
                        {if $page->threeDots}
                            <span class="tw-mx-2">...</span>
                        {else}
                            <a href="#"
                               hx-get="{stbIO uri='getErrorTable' page=$page->offset}"
                               hx-target="#errorTable"
                               hx-swap="innerHTML"
                               class="{if $page->active}tw-bg-brand-500/[0.08]! tw-text-brand-500!
                               tw-hover:text-brand-500! tw-dark:text-brand-500! tw-dark:hover:text-brand-500!
                               {else}tw-hover:bg-brand-500/[0.08]! tw-hover:text-brand-500!
                               tw-dark:hover:text-brand-500! tw-text-gray-700! tw-dark:text-gray-400!{/if}
                               tw-text-theme-sm tw-flex tw-h-10 tw-w-10 tw-items-center tw-justify-center
                               tw-rounded-lg tw-font-medium">
                                {$page->offset}
                            </a>
                        {/if}
                    </li>
                {/foreach}
            </ul>
            <button hx-get="{stbIO uri='getErrorTable' page=$table->getPagination()->getNextPage()}"
                    hx-target="#errorTable"
                    hx-swap="innerHTML"
                    class="tw-text-theme-sm tw-shadow-theme-xs tw-flex tw-items-center tw-gap-2
                    tw-rounded-lg tw-border tw-border-gray-300 tw-bg-white tw-px-2 tw-py-2 tw-font-medium
                    tw-text-gray-700 tw-hover:bg-gray-50 tw-hover:text-gray-800 tw-sm:px-3.5
                    tw-dark:border-gray-700 tw-dark:bg-gray-800 tw-dark:text-gray-400
                    tw-dark:hover:bg-white/[0.03] tw-dark:hover:text-gray-200">
                <span class="tw-hidden tw-sm:inline">{__('Next')}</span>
                <svg class="tw-fill-current"
                     width="20"
                     height="20"
                     viewBox="0 0 20 20"
                     fill="none"
                     xmlns="http://www.w3.org/2000/svg">
                    <path fill-rule="evenodd"
                          clip-rule="evenodd"
                          d="M17.4175 9.9986C17.4178 10.1909 17.3446 10.3832 17.198 10.53L12.2013 15.5301C11.9085 15.8231 11.4337 15.8233 11.1407 15.5305C10.8477 15.2377 10.8475 14.7629 11.1403 14.4699L14.8604 10.7472L3.33301 10.7472C2.91879 10.7472 2.58301 10.4114 2.58301 9.99715C2.58301 9.58294 2.91879 9.24715 3.33301 9.24715L14.8549 9.24715L11.1403 5.53016C10.8475 5.23717 10.8477 4.7623 11.1407 4.4695C11.4336 4.1767 11.9085 4.17685 12.2013 4.46984L17.1588 9.43049C17.3173 9.568 17.4175 9.77087 17.4175 9.99715C17.4175 9.99763 17.4175 9.99812 17.4175 9.9986Z"
                          fill=""
                    />
                </svg>
            </button>
        </div>
    </div>
    {/if}
</div>
