<?php
defined( 'ABSPATH' ) or die( 'Something went wrong.' );

$readjutsu_activate       = get_option( 'readjutsu_activate', false );
$readjutsu_wpm            = get_option( 'readjutsu_wpm', 238 );
$readjutsu_include_images = get_option( 'readjutsu_include_images', false );
?>

<div id="general-settings" class="readjutsu-settings__menu-content active">

	<div class="readjutsu-settings__menu-content__title">
		<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="3"/><path d="M19.07 4.93l-1.41 1.41M4.93 4.93l1.41 1.41M19.07 19.07l-1.41-1.41M4.93 19.07l1.41-1.41M12 2v2M12 20v2M2 12h2M20 12h2"/></svg>
		<?php esc_html_e( 'General Settings', 'readjutsu' ); ?>
	</div>

	<div class="readjutsu-settings__menu-content__option">
		<div class="readjutsu-settings__menu-content__label">
			<strong><?php esc_html_e( 'Enable ReadJutsu', 'readjutsu' ); ?></strong>
			<p><?php esc_html_e( 'Activate reading time and progress bar on your site.', 'readjutsu' ); ?></p>
		</div>
		<div class="readjutsu-settings__menu-content__option__input">
			<label class="readjutsu-settings__activate">
				<input type="checkbox" name="readjutsu_activate" value="1" <?php checked( $readjutsu_activate ); ?>>
				<span class="readjutsu-settings__activate__toggle"></span>
			</label>
		</div>
	</div>

	<div class="readjutsu-settings__menu-content__option">
		<div class="readjutsu-settings__menu-content__label">
			<strong><?php esc_html_e( 'Words Per Minute', 'readjutsu' ); ?></strong>
			<p><?php esc_html_e( 'Average reading speed. Default: 238 WPM.', 'readjutsu' ); ?></p>
		</div>
		<div class="readjutsu-settings__menu-content__option__input">
			<input type="number" name="readjutsu_wpm" value="<?php echo esc_attr( $readjutsu_wpm ); ?>" min="50" max="1000" step="1" class="readjutsu-input-number">
			<span class="readjutsu-input-unit"><?php esc_html_e( 'WPM', 'readjutsu' ); ?></span>
		</div>
	</div>

	<div class="readjutsu-settings__menu-content__option">
		<div class="readjutsu-settings__menu-content__label">
			<strong><?php esc_html_e( 'Include Images', 'readjutsu' ); ?></strong>
			<p><?php esc_html_e( 'Add image viewing time to the estimate (Medium algorithm).', 'readjutsu' ); ?></p>
		</div>
		<div class="readjutsu-settings__menu-content__option__input">
			<label class="readjutsu-settings__activate">
				<input type="checkbox" name="readjutsu_include_images" value="1" <?php checked( $readjutsu_include_images ); ?>>
				<span class="readjutsu-settings__activate__toggle"></span>
			</label>
		</div>
	</div>

</div>
