<?php
/**
 * Author Profile Table Markup
 *
 * Contains the frontend HTML structure for rendering the author profile table in Author Kit admin pages.
 *
 * @package Author_Kit
 * @since 1.0.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

require AUTHOR_KIT_PLUGIN_PATH . 'admin/views/author-kit-admin-header.php';

?>
<div class="main-content">

	<!-- btn and others -->
	<div id="author-profile-table-header">
		<div id="left-container">
			<h4><?php esc_html_e( 'Author Profiles', 'author-kit' ); ?></h4>

			<p id="tooltip-text" class="hidden">
				<?php esc_html_e( 'Author Profiles are automatically created only for Post Author and Contributor', 'author-kit' ); ?>
			</p>

			<i class="fa-regular fa-circle-question tooltip-icon" aria-describedby="tooltip-bottom"></i>

			<!-- Tooltip -->
			<div id="tooltip-bottom" class="tooltip-box">
				<?php esc_html_e( 'Author Profiles are automatically created only for Post Author and Contributor', 'author-kit' ); ?>
				<div class="tooltip-arrow"></div>
			</div>
		</div>

		<div id="right-container">

			<div class="switch-container" id="switch-container" style="display: none;">
				<b style="margin-right: 10px;"><?php esc_html_e( 'Bulk Update:', 'author-kit' ); ?></b>
				<label for="display-all-bio-widget"><?php esc_html_e( 'Author Bio Box', 'author-kit' ); ?></label>
				<label class="switch">
					<input type="checkbox" id="display-all-bio-widget">
					<span class="slider round"></span>
				</label>
			</div>
			<div class="search-bar">
				<i class="fas fa-search"></i>
				<input type="text" placeholder="<?php esc_html_e( 'Search by Name', 'author-kit' ); ?>" id="users-profile-search">
			</div>


		</div>
	</div>


	<!-- Table data admin ,user etc -->
	<div id="data-table-authorwp">
		<div id="filter-tabs">

			<p id="all-authors" onclick=""><?php esc_html_e( 'All', 'author-kit' ); ?></p> <span id="information"></span>
			<p id="on-site-authors"><?php esc_html_e( 'On-site', 'author-kit' ); ?></p> <span id="information"></span>
			<p id="guest-authors"><?php esc_html_e( 'Guest', 'author-kit' ); ?></p> <span id="information"></span>

		</div>
	</div>


	<div class="table-container">
		<table id="profileTable">
			<thead current-page-id="">
				<tr>
					<th><input type="checkbox" id="select-all" /></th>
					<th data-column="user_login" class="sortable">
						<?php esc_html_e( 'AUTHOR', 'author-kit' ); ?>
						<span class="sort-icons">
							<i class="sort-icon asc">&#9650;</i>
							<i class="sort-icon desc">&#9660;</i>
						</span>
					</th>
					<th><?php esc_html_e( 'ROLE', 'author-kit' ); ?></th>
					<th><?php esc_html_e( 'Author Bio Box', 'author-kit' ); ?></th>
					<th><?php esc_html_e( 'EDIT', 'author-kit' ); ?></th>
				</tr>
			</thead>
			<tbody>
				<!-- Data will be injected here by JavaScript -->
			</tbody>

		</table>

		<!-- Place this loader html in this location after table tag close Necessary -->
		<div id="loader" style="display: none;">
			<div>
				<div class="author-kit-loader"></div>
			</div>
		</div>

		<div id="pagination">
			<section id="pagination-footer"> <?php esc_html_e( 'Users Per Page: ', 'author-kit' ); ?>
				<select id="rowsPerPage" user-data-category="">
					<option selected value="5">5</option>
					<option selected value="10">10</option>
					<option value="25">25</option>
					<option value="50">50</option>
					<option value="75">75</option>
					<option value="100">100</option>
					<option value="-1">All</option>
				</select>
				<span id="paginationControls">
					<button id="prevPage" prev-page-id="1" user-data-category=""><?php esc_html_e( 'Previous', 'author-kit' ); ?></button>
					<span id="pageNumbers"></span>
					<button id="nextPage" next-page-id="2" user-data-category=""><?php esc_html_e( 'Next', 'author-kit' ); ?></button>
				</span>
				<span id="pageInfo"></span>

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