<?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: ZIP Import -->
		<div id="mbs-panel-zip"
		     class="mbs-imp-exp-panel"
		     role="tabpanel"
		     hidden>
			<h3><?php esc_html_e( 'Import from ZIP', 'my-book-showroom' ); ?></h3>
			<p class="mbs-panel-lead"><?php esc_html_e( 'Upload a ZIP archive exported by My Book Showroom. The archive contains catalog.xlsx and media subfolders (covers/, banners/, trailers/, spinning-videos/, audio/, author-headshots/). Books and all bundled media are imported in three phases with real-time progress. Note: file size has a 200M limit', 'my-book-showroom' ); ?></p>

			<div class="mbs-imp-exp-hint">
				<?php esc_html_e( 'Use "Export Catalog + Media" to generate a compatible ZIP. Taxonomy terms and settings are applied first, then books are created, then media is sideloaded.', 'my-book-showroom' ); ?>
			</div>

			<!-- Drop zone: click to select a file, or drag and drop. -->
			<div id="mbs-archive-import-drop-zone" class="mbs-archive-drop-zone">
				<input type="file"
				       id="mbs-archive-import-file"
				       accept=".zip"
				       style="display:none;" />
				<p><?php esc_html_e( 'Click to select a ZIP file, or drag and drop here.', 'my-book-showroom' ); ?></p>
				<p id="mbs-archive-import-filename" class="mbs-archive-filename"></p>
			</div>

			<p style="margin-top:12px;">
				<button type="button"
				        id="mbs-archive-import-start-btn"
				        class="button button-primary"
				        disabled>
					<?php esc_html_e( 'Import Archive', 'my-book-showroom' ); ?>
				</button>
			</p>

			<!-- Progress bar (shown during import). -->
			<div id="mbs-archive-import-progress" style="display:none; margin-top:16px;">
				<div id="mbs-archive-import-bar" class="mbs-archive-bar">
					<div id="mbs-archive-import-bar-fill" class="mbs-archive-bar-fill" style="width:0;"></div>
				</div>
				<p id="mbs-archive-import-bar-label" class="mbs-archive-bar-label"></p>
			</div>

			<!-- Per-book log (shown during import). -->
			<div id="mbs-archive-import-log" class="mbs-archive-log" style="display:none;"></div>

			<!-- Status message (shown after import completes or fails). -->
			<div id="mbs-archive-import-status" class="mbs-archive-status" style="display:none;"></div>
		</div><!-- #mbs-panel-zip -->
