<?php
/**
 * Memory teaser view (free/unpaid users).
 *
 * Shows a blurred, non-interactive preview of the memory hub
 * with a CTA overlay to upgrade.
 *
 * @package SlideMind
 * @since 2.3.0
 */

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

$upgrade_url = \SlideMind\Core\FeatureGate::get_upgrade_url();
?>
<div class="sm-wrap">
	<div class="sm-header">
		<h1><?php esc_html_e( 'Memory', 'slidemind' ); ?></h1>
	</div>

	<div class="sm-teaser">
		<!-- CTA overlay -->
		<div class="sm-teaser__overlay">
			<div class="sm-teaser__card">
				<span class="dashicons dashicons-lock sm-teaser__lock-icon"></span>
				<h2 class="sm-teaser__title">
					<?php esc_html_e( 'Unlock Learner Memory', 'slidemind' ); ?>
				</h2>
				<p class="sm-teaser__desc">
					<?php esc_html_e( 'Unlock unlimited variables, LMS profile fields, and advanced learner data with the Memory or Pro plan.', 'slidemind' ); ?>
				</p>
				<?php if ( $upgrade_url ) : ?>
					<a href="<?php echo esc_url( $upgrade_url ); ?>" class="sm-btn sm-btn-primary sm-teaser__cta-btn">
						<?php esc_html_e( 'View Plans & Pricing', 'slidemind' ); ?>
						<span class="dashicons dashicons-arrow-right-alt2"></span>
					</a>
				<?php endif; ?>
				<p class="sm-teaser__sub">
					<?php esc_html_e( 'Available with the Memory plan or the Pro plan.', 'slidemind' ); ?>
				</p>
			</div>
		</div>

		<!-- Blurred preview -->
		<div class="sm-teaser__preview" aria-hidden="true">

			<div class="sm-tabs">
				<button type="button" class="sm-tab active" disabled><?php esc_html_e( 'Definitions', 'slidemind' ); ?></button>
				<button type="button" class="sm-tab" disabled><?php esc_html_e( 'Learner Data', 'slidemind' ); ?></button>
			</div>

			<!-- Standalone Variables card -->
			<div class="sm-card">
				<div class="sm-card-header">
					<h2 class="sm-card-title"><?php esc_html_e( 'Standalone Variables', 'slidemind' ); ?></h2>
				</div>
				<div class="sm-notice sm-notice-info">
					<span class="dashicons dashicons-info"></span>
					<div><?php esc_html_e( 'Variables that work without LLM: capture data directly from the e-learning module and store it in global learner memory.', 'slidemind' ); ?></div>
				</div>
				<table class="sm-table">
					<thead>
						<tr>
							<th style="width: 40px;"><input type="checkbox" disabled></th>
							<th><?php esc_html_e( 'Variable Name', 'slidemind' ); ?></th>
							<th><?php esc_html_e( 'Description', 'slidemind' ); ?></th>
							<th><?php esc_html_e( 'Learners', 'slidemind' ); ?></th>
							<th style="width: 60px;"><?php esc_html_e( 'Edit', 'slidemind' ); ?></th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td><input type="checkbox" disabled></td>
							<td><code>profession</code></td>
							<td><?php esc_html_e( 'Learner profession', 'slidemind' ); ?></td>
							<td>12</td>
							<td><button class="sm-btn sm-btn-sm sm-btn-secondary" disabled><span class="dashicons dashicons-edit" style="font-size:14px;width:14px;height:14px;"></span></button></td>
						</tr>
						<tr>
							<td><input type="checkbox" disabled></td>
							<td><code>experience_level</code></td>
							<td><?php esc_html_e( 'Years of experience', 'slidemind' ); ?></td>
							<td>8</td>
							<td><button class="sm-btn sm-btn-sm sm-btn-secondary" disabled><span class="dashicons dashicons-edit" style="font-size:14px;width:14px;height:14px;"></span></button></td>
						</tr>
						<tr>
							<td><input type="checkbox" disabled></td>
							<td><code>preferred_language</code></td>
							<td><?php esc_html_e( 'Preferred language', 'slidemind' ); ?></td>
							<td>5</td>
							<td><button class="sm-btn sm-btn-sm sm-btn-secondary" disabled><span class="dashicons dashicons-edit" style="font-size:14px;width:14px;height:14px;"></span></button></td>
						</tr>
					</tbody>
				</table>
			</div>

			<!-- Slide Variables card -->
			<div class="sm-card">
				<div class="sm-card-header">
					<h2 class="sm-card-title"><?php esc_html_e( 'Variables Defined in Slides', 'slidemind' ); ?></h2>
					<span class="sm-badge sm-badge-muted"><?php esc_html_e( 'Read-only', 'slidemind' ); ?></span>
				</div>
				<table class="sm-table">
					<thead>
						<tr>
							<th><?php esc_html_e( 'Variable', 'slidemind' ); ?></th>
							<th><?php esc_html_e( 'Scope', 'slidemind' ); ?></th>
							<th><?php esc_html_e( 'Source Slide', 'slidemind' ); ?></th>
							<th><?php esc_html_e( 'Module', 'slidemind' ); ?></th>
							<th><?php esc_html_e( 'Course', 'slidemind' ); ?></th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td><code>nom_personnage</code></td>
							<td>module</td>
							<td>Capture d'info</td>
							<td>Module de formation</td>
							<td>Onboarding</td>
						</tr>
						<tr>
							<td><code>objectif</code></td>
							<td>global</td>
							<td>Introduction</td>
							<td>Module 1</td>
							<td>Formation IA</td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>
