<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Variables in scope (injected via mbs_get_template_part from imp-exp-ui.php).
 * @var bool   $is_registered
 * @var bool   $is_pro
 * @var string $nonce
 * @var string $template_url
 */
?>

		<!-- Panel: Press Kit (PRO) -->
		<div id="mbs-panel-press-kit"
		     class="mbs-imp-exp-panel"
		     role="tabpanel"
		     hidden>
			<h3><?php esc_html_e( 'Press Kit Settings', 'my-book-showroom' ); ?></h3>

			<?php if ( $is_pro ) : ?>
				<p class="mbs-panel-lead"><?php esc_html_e( 'Configure press kit generation. The Press Kit DOCX button appears on each book edit screen.', 'my-book-showroom' ); ?></p>

				<form method="post" action="options.php">
					<?php settings_fields( 'mbs_import_export' ); ?>

					<table class="form-table">
						<tr>
							<th scope="row">
								<label for="mbs_press_kit_public"><?php esc_html_e( 'Public Download Button', 'my-book-showroom' ); ?></label>
							</th>
							<td>
								<label>
									<input type="checkbox"
									       name="mbs_press_kit_public"
									       id="mbs_press_kit_public"
									       value="1"
									       <?php checked( 1, (int) get_option( 'mbs_press_kit_public', 0 ) ); ?> />
									<?php esc_html_e( 'Show a Download Press Kit button on the front-end single book page', 'my-book-showroom' ); ?>
								</label>
							</td>
						</tr>
						<tr>
							<th scope="row">
								<label for="mbs_press_kit_test_mode"><?php esc_html_e( 'Test Mode (Skip Cover Ratio Check)', 'my-book-showroom' ); ?></label>
							</th>
							<td>
								<label>
									<input type="checkbox"
									       name="mbs_press_kit_test_mode"
									       id="mbs_press_kit_test_mode"
									       value="1"
									       <?php checked( 1, (int) get_option( 'mbs_press_kit_test_mode', 0 ) ); ?> />
									<?php esc_html_e( 'Bypass the 2:3 cover aspect-ratio enforcement during generation', 'my-book-showroom' ); ?>
								</label>
								<p class="description"><?php esc_html_e( 'Enable this during development to generate press kits with non-standard cover images.', 'my-book-showroom' ); ?></p>
							</td>
						</tr>
					</table>

					<?php submit_button( esc_html__( 'Save Press Kit Settings', 'my-book-showroom' ) ); ?>
				</form>

			<?php else : ?>
				<?php MBS_Pro_Gate::comment( 'Press Kit' ); ?>
				<div class="mbs-imp-exp-soon">
					<span class="dashicons dashicons-lock"></span>
					<p><?php esc_html_e( 'Press Kit generation requires a PRO license.', 'my-book-showroom' ); ?></p>
				</div>
			<?php endif; ?>
		</div><!-- #mbs-panel-press-kit -->
