<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<div id="wpps-replace-media-modal" class="wpps-replace-media-modal" role="dialog" aria-labelledby="wpps-replace-media-title" aria-hidden="true" style="display:none;">
	<div class="wpps-replace-media-modal-backdrop"></div>
	<div class="wpps-replace-media-modal-content">
		<h2 id="wpps-replace-media-title"><?php esc_html_e( 'Replace Media', 'wppowersuite-lite' ); ?></h2>

		<div class="wpps-replace-current" id="wpps-replace-current-info" style="display:none;">
			<h3><?php esc_html_e( 'Current file', 'wppowersuite-lite' ); ?></h3>
			<div class="wpps-replace-preview">
				<img id="wpps-replace-preview-img" src="" alt="" style="max-width: 120px; max-height: 120px;" />
				<div id="wpps-replace-preview-icon" class="wpps-replace-file-icon" style="display:none;"></div>
				<div class="wpps-replace-file-details">
					<p class="wpps-replace-filename"><strong id="wpps-replace-filename"></strong></p>
					<p class="wpps-replace-meta" id="wpps-replace-meta"></p>
				</div>
			</div>
		</div>

		<div class="wpps-replace-upload">
			<h3><?php esc_html_e( 'Upload new file', 'wppowersuite-lite' ); ?></h3>
			<p class="wpps-replace-hint" id="wpps-replace-type-hint"></p>
			<p>
				<label for="wpps-replace-file-input" class="button button-secondary">
					<span id="wpps-replace-file-label"><?php esc_html_e( 'Choose file', 'wppowersuite-lite' ); ?></span>
				</label>
				<input type="file" id="wpps-replace-file-input" class="wpps-replace-file-input" accept="" />
			</p>
		</div>

		<div class="wpps-replace-options">
			<label>
				<input type="checkbox" id="wpps-replace-keep-filename" checked />
				<?php esc_html_e( 'Keep original filename', 'wppowersuite-lite' ); ?>
			</label>
			<p class="description"><?php esc_html_e( 'Recommended to maintain URL consistency.', 'wppowersuite-lite' ); ?></p>
			<label>
				<input type="checkbox" id="wpps-replace-keep-date" checked />
				<?php esc_html_e( 'Keep original upload date', 'wppowersuite-lite' ); ?>
			</label>
			<label>
				<input type="checkbox" id="wpps-replace-keep-backup" />
				<?php esc_html_e( 'Keep original file in media library (as backup)', 'wppowersuite-lite' ); ?>
			</label>
			<p class="description"><?php esc_html_e( 'Copies the old file with a new name and adds it as a separate media item.', 'wppowersuite-lite' ); ?></p>
		</div>

		<div class="wpps-replace-progress" id="wpps-replace-progress" style="display:none;">
			<progress id="wpps-replace-progress-bar" value="0" max="100"></progress>
			<p id="wpps-replace-progress-text"></p>
		</div>

		<div class="wpps-replace-result" id="wpps-replace-result" style="display:none;"></div>

		<div class="wpps-replace-actions">
			<button type="button" class="button button-primary" id="wpps-replace-submit" disabled>
				<?php esc_html_e( 'Replace', 'wppowersuite-lite' ); ?>
			</button>
			<button type="button" class="button" id="wpps-replace-cancel">
				<?php esc_html_e( 'Cancel', 'wppowersuite-lite' ); ?>
			</button>
		</div>
	</div>
</div>
