<?php
/**
 * Dashboard Page Template
 *
 * @package Scanshow
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div class="wrap stw-dashboard-wrap">
	<div class="stw-admin-content" id="stw-dashboard-page">
		<div id="message-container"></div>

		<!-- Connection Status Bar -->
		<div class="stw-connection-bar">
			<div id="connection-display">
				<p class="loading"><?php esc_html_e( 'Checking connection...', '3d-scan-and-show' ); ?></p>
			</div>
		</div>

		<!-- Plan and Quota Info -->
		<div class="stw-plan-quota-container">
			<div id="plan-quota-display">
				<p class="loading"><?php esc_html_e( 'Loading plan information...', '3d-scan-and-show' ); ?></p>
			</div>
		</div>

		<!-- Product Tabs and Actions -->
		<div class="stw-products-section">
			<!-- New WowRevenue Style Header Bar -->
			<div class="stw-header">
				<button class="button stw-sort-name-btn" id="sort-by-name">
					↑ <?php esc_html_e( 'Name', '3d-scan-and-show' ); ?>
				</button>
				<button class="button stw-filter-btn" id="filter-btn">
					<span class="dashicons dashicons-filter"></span> <?php esc_html_e( 'Filter', '3d-scan-and-show' ); ?>
				</button>
				<input
					type="text"
					id="product-search"
					placeholder="<?php esc_attr_e( 'Search product by Name...', '3d-scan-and-show' ); ?>"
					class="stw-search-input"
				/>
				<div class="stw-more-menu">
					<button class="button stw-more-btn" id="more-actions-btn">
						<span class="dashicons dashicons-ellipsis"></span>
					</button>
					<div class="stw-more-dropdown" id="more-dropdown" style="display: none;">
						<button class="stw-dropdown-item" id="product-theme-editor-btn">
							<span class="dashicons dashicons-admin-customizer"></span> <?php esc_html_e( 'Product Theme Editor', '3d-scan-and-show' ); ?>
						</button>
						<button class="stw-dropdown-item" id="add-product-btn">
							<span class="dashicons dashicons-plus-alt"></span> <?php esc_html_e( 'Add product', '3d-scan-and-show' ); ?>
						</button>
					</div>
				</div>
			</div>

			<!-- Filter Panel (Hidden by default) -->
			<div id="filter-panel" class="stw-filter-panel" style="display: none;">
				<div class="stw-filter-content">
					<div class="stw-filter-group">
						<label><?php esc_html_e( 'Category:', '3d-scan-and-show' ); ?></label>
						<select id="category-filter" class="regular-text">
							<option value=""><?php esc_html_e( 'All Categories', '3d-scan-and-show' ); ?></option>
						</select>
					</div>
					<button class="button" id="clear-filters-btn"><?php esc_html_e( 'Clear All', '3d-scan-and-show' ); ?></button>
				</div>
			</div>

			<!-- Products Table -->
			<div id="products-container">
				<p class="loading"><?php esc_html_e( 'Loading products...', '3d-scan-and-show' ); ?></p>
			</div>
		</div>
	</div>
</div>

