<?php

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
/**
 * Renders the HTML for the destructive Reset tab.
 */
class Sifency_Admin_Reset_UI {
	private $section_slug;

	public function __construct( $section_slug ) {
		$this->section_slug = $section_slug;
	}

	public function render() {
		ob_start();
		?>
		<div class="sifency-danger-notice">
			<strong><?php esc_html_e( 'Warning: Highly Destructive Actions', 'sifency-addons' ); ?></strong>
			<?php esc_html_e( 'The tools on this tab will permanently delete data from your database. This cannot be undone. Always create a full site backup before proceeding.', 'sifency-addons' ); ?>
		</div>
		<div class="sifency-export-grid">
			<div class="sifency-export-item">
				<h2><?php esc_html_e( 'Reset Theme Settings', 'sifency-addons' ); ?></h2>
				<p><?php esc_html_e( 'This provides a "clean slate" before a fresh import by resetting all theme-related data.', 'sifency-addons' ); ?></p>
				<strong><?php esc_html_e( 'This Will Reset:', 'sifency-addons' ); ?></strong>
				<ul>
					<li><?php esc_html_e( 'Theme Options', 'sifency-addons' ); ?></li>
					<li><?php esc_html_e( 'Customizer Settings', 'sifency-addons' ); ?></li>
					<li><?php esc_html_e( 'Widgets & Sidebars', 'sifency-addons' ); ?></li>
					<li><?php esc_html_e( 'Menus', 'sifency-addons' ); ?></li>
					<li><?php esc_html_e( 'Elementor Kit Settings', 'sifency-addons' ); ?></li>
				</ul>
				<p><em><?php esc_html_e( 'Note: This does NOT delete posts, pages, or media.', 'sifency-addons' ); ?></em></p>
				<br>
				<?php echo wp_kses_post ( Sifency_Admin_Button_Generator::create_reset_button( 'reset_settings', 'Reset Theme Settings', $this->section_slug )); ?>
			</div>
		</div>
		<div class="sifency-reset-confirm">
			<label for="sifency-reset-checkbox">
				<input type="checkbox" id="sifency-reset-checkbox">
				<strong><?php esc_html_e( 'I have a backup and I understand these actions are irreversible.', 'sifency-addons' ); ?></strong>
			</label>
		</div>
		<?php
		return ob_get_clean();
	}
}