<?php defined( 'ABSPATH' ) || exit; ?>
<div class="dialog-widget dialog-lightbox-widget dialog-type-buttons dialog-type-lightbox elementor-templates-modal kaveh-dynamic-content-modal" id="kaveh-template-library-modal" style="display: none;">
	<div class="dialog-widget-content dialog-lightbox-widget-content">
		<div class="dialog-header dialog-lightbox-header">
			<div class="elementor-templates-modal__header ekit-layout-library--header">
				<!-- 🔹 Logo Area -->
				<div class="elementor-templates-modal__header__logo-area ekit-layout-library--logo">
					<div class="elementor-templates-modal__header__logo">
					<img src="https://s21.uupload.ir/files/moein757/kaveh-logo.svg" alt="Kaveh Icon" width="32" height="32" style="margin-left:5px;" />

						<span class="elementor-templates-modal__header__logo__title"><?php esc_html_e('Kaveh Library', 'kavehTheme'); ?></span>
					</div>
				</div>

				<!-- 🔹 Tabs (hidden in preview mode) -->
				<div class="elementor-templates-modal__header__menu-area" id="kaveh-template-library-header-menu">
					<!-- Tabs are added with JS -->
				</div>

				<!-- 🔹 Tools Area -->
				<div class="elementor-templates-modal__header__items-area">
					<!-- Close Button -->
					<div class="elementor-templates-modal__header__close elementor-templates-modal__header__close--normal elementor-templates-modal__header__item kaveh-template-library-close">
						<i class="eicon-close" aria-hidden="true" title="<?php esc_attr_e('Close', 'kavehTheme'); ?>"></i>
						<span class="elementor-screen-only"><?php esc_html_e('Close', 'kavehTheme'); ?></span>
					</div>

					<!-- Preview Tools -->
					<div id="kaveh-template-library-header-tools">
						<div id="kaveh-template-library-header-preview" style="display:none;">
							<div id="kaveh-template-library-header-preview-insert-wrapper" class="elementor-templates-modal__header__item">
								<a class="elementor-template-library-template-action kaveh-preview-live" href="#" target="_blank">
									<i class="eicon-editor-external-link"></i>
									<span class="elementor-button-title"><?php esc_html_e('Live Preview', 'kavehTheme'); ?></span>
								</a>
								<a class="elementor-template-library-template-action elementor-button elementor-template-library-template-insert kaveh-preview-insert" href="#">
									<i class="eicon-file-download" aria-hidden="true"></i>
									<span class="elementor-button-title"><?php esc_html_e('Insert', 'kavehTheme'); ?></span>
								</a>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<div class="dialog-message dialog-lightbox-message">
			<div class="dialog-content dialog-lightbox-content">

				<!-- 🔸 Main Content -->
				<div id="kaveh-template-library-content" data-template-source="remote">
					<!-- Content is rendered by JS -->
				</div>

				<!-- 🔸 Preview -->
				<div id="kaveh-template-library-preview" style="display:none;">
					<div class="kaveh-preview-image-wrapper" style="text-align:center;">
						<img src="" alt="Preview" class="kaveh-preview-image" style="width: 100%; max-height: 80vh; object-fit: contain;" />
					</div>
				</div>
			</div>

			<!-- 🔄 Loader -->
			<div class="dialog-loading dialog-lightbox-loading kaveh-template-library-loading" style="display: none;">
				<div id="elementor-template-library-loading">
					<div class="elementor-loader-wrapper">
						<div class="elementor-loader">
							<div class="elementor-loader-boxes">
								<div class="elementor-loader-box"></div>
								<div class="elementor-loader-box"></div>
								<div class="elementor-loader-box"></div>
								<div class="elementor-loader-box"></div>
							</div>
						</div>
						<div class="elementor-loading-title"><?php esc_html_e('Loading', 'kavehTheme'); ?></div>
					</div>
				</div>
			</div>



		</div>
	</div>
</div>
