<?php
/**
 * Introduction — qu'est-ce que Core Version Switcher ?
 *
 * @package CVS
 * @license GPL-2.0-or-later
 */

defined( 'ABSPATH' ) || exit;

$intro_collapsed = CVS_Admin::is_intro_collapsed();
?>
<section
	class="cvs-intro<?php echo $intro_collapsed ? ' is-collapsed' : ''; ?>"
	id="cvs-intro"
	aria-labelledby="cvs-intro-title"
>
	<div class="cvs-intro-icon" aria-hidden="true">🔄</div>
	<div class="cvs-intro-body">
		<div class="cvs-intro-head">
			<h2 id="cvs-intro-title"><?php esc_html_e( 'What does this plugin do?', 'core-version-switcher-by-volade' ); ?></h2>
			<button
				type="button"
				class="button-link cvs-intro-toggle"
				aria-expanded="<?php echo $intro_collapsed ? 'false' : 'true'; ?>"
				aria-controls="cvs-intro-content"
				data-label-collapse="<?php esc_attr_e( 'Collapse', 'core-version-switcher-by-volade' ); ?>"
				data-label-expand="<?php esc_attr_e( 'Show introduction', 'core-version-switcher-by-volade' ); ?>"
			>
				<?php echo $intro_collapsed ? esc_html__( 'Show introduction', 'core-version-switcher-by-volade' ) : esc_html__( 'Collapse', 'core-version-switcher-by-volade' ); ?>
			</button>
		</div>
		<div class="cvs-intro-collapsible" id="cvs-intro-content"<?php echo $intro_collapsed ? ' hidden' : ''; ?>>
			<p class="cvs-intro-lead">
				<?php esc_html_e( 'Core Version Switcher pins WordPress to a specific release. You then use Dashboard → Updates → Reinstall — the same native updater as a normal upgrade, but aimed at your chosen version.', 'core-version-switcher-by-volade' ); ?>
			</p>
			<ul class="cvs-intro-list">
				<li><strong><?php esc_html_e( 'Downgrade', 'core-version-switcher-by-volade' ); ?></strong> — <?php esc_html_e( 'rollback after a bad update or plugin conflict.', 'core-version-switcher-by-volade' ); ?></li>
				<li><strong><?php esc_html_e( 'Stay on a branch', 'core-version-switcher-by-volade' ); ?></strong> — <?php esc_html_e( 'delay a major until your stack is ready.', 'core-version-switcher-by-volade' ); ?></li>
				<li><strong><?php esc_html_e( 'Staging clone', 'core-version-switcher-by-volade' ); ?></strong> — <?php esc_html_e( 'match production core on a test site.', 'core-version-switcher-by-volade' ); ?></li>
			</ul>
			<p class="cvs-intro-tip">
				<?php esc_html_e( 'Always back up files and database first. Database schema is not rolled back automatically.', 'core-version-switcher-by-volade' ); ?>
			</p>
		</div>
	</div>
</section>
